/* ====================================================
   DOKUMENTŲ MAINŲ MODULIO STILIUS V2 (Kortelės)
   ==================================================== */

.tf-dokumentai { font-family: 'Inter', sans-serif; color: var(--tf-text-main); transition: color 0.3s; }

/* Pranešimai */
.tf-success-msg { padding: 15px 20px; background: rgba(16, 185, 129, 0.1); color: #10b981; border-radius: 12px; margin-bottom: 25px; border-left: 5px solid #10b981; font-weight: 600; box-shadow: 0 4px 6px -1px var(--tf-shadow); animation: fadeIn 0.5s ease-out; }
.tf-error-msg { padding: 15px 20px; background: rgba(239, 68, 68, 0.1); color: #ef4444; border-radius: 12px; margin-bottom: 25px; border-left: 5px solid #ef4444; font-weight: 600; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Layoutas ir Sidebar */
.tf-layout { display: flex; gap: 30px; align-items: flex-start; }
@media (max-width: 900px) { .tf-layout { flex-direction: column; } }

.tf-sidebar { width: 260px; background: var(--tf-bg-card); border: 1px solid var(--tf-border); border-radius: 16px; padding: 20px; box-shadow: 0 4px 15px var(--tf-shadow); flex-shrink: 0; }
@media (max-width: 900px) { .tf-sidebar { width: 100%; box-sizing: border-box; } }

.tf-sidebar-title { font-size: 13px; font-weight: 800; color: var(--tf-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 15px 0; }
.tf-divider { height: 1px; background: var(--tf-border); margin: 20px 0; }

.tf-side-btn { display: block; width: 100%; text-align: left; padding: 12px 15px; margin-bottom: 8px; border: 1px solid var(--tf-border); background: var(--tf-bg-box); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--tf-text-heading); cursor: pointer; transition: all 0.2s; font-family: inherit; }
.tf-side-btn:hover { background: var(--tf-menu-hover); border-color: var(--tf-primary); }
.tf-side-btn.active { background: var(--tf-primary); color: white; border-color: var(--tf-primary); }

.tf-main-content { flex: 1; min-width: 0; }

/* Įkėlimo Langas */
.tf-upload-box { background: var(--tf-bg-box); border: 2px dashed var(--tf-border); border-radius: 16px; padding: 30px; margin-bottom: 35px; transition: 0.3s; }
.tf-upload-box:hover { border-color: var(--tf-primary); }

.tf-input-group label { display: block; font-size: 12px; font-weight: 700; color: var(--tf-text-muted); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.5px; }
.tf-input-group input[type="file"] { padding: 12px; background: var(--tf-input-bg); border: 1px solid var(--tf-border); border-radius: 8px; width: 100%; box-sizing: border-box; font-size: 14px; color: var(--tf-text-main); cursor: pointer; }

.tf-btn-upload { background: var(--tf-primary); color: white; padding: 12px 25px; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s; height: 44px; width: 100%; font-size: 14px; margin-top: 20px; display: none; }
.tf-btn-upload:hover { filter: brightness(0.9); }

/* Dinaminės įkėlimo eilutės */
.tf-dynamic-row { display: flex; gap: 15px; margin-top: 10px; padding: 15px; background: var(--tf-bg-card); border: 1px solid var(--tf-border); border-radius: 10px; align-items: center; flex-wrap: wrap; animation: fadeIn 0.3s ease-out; }
.tf-select-status, .tf-input-comment { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid var(--tf-border); font-size: 13px; font-family: inherit; background: var(--tf-input-bg); color: var(--tf-text-main); outline: none; }
.tf-select-status:focus, .tf-input-comment:focus { border-color: var(--tf-primary); }

/* ================== KORTELĖS ================== */
.tf-docs-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }

.tf-doc-row-card { background: var(--tf-bg-card); border: 1px solid var(--tf-border); border-radius: 10px; padding: 14px 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); display: flex; flex-direction: column; gap: 8px; transition: all 0.2s ease; }
.tf-doc-row-card:hover { border-color: var(--tf-primary); transform: translateX(3px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.tf-doc-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--tf-text-heading); line-height: 1.3; }
.tf-doc-comment { font-size: 12px; font-weight: normal; color: var(--tf-text-muted); margin-left: 8px; display: inline-block; font-style: italic; }

.tf-doc-middle-row { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: space-between; }
.tf-doc-price-status { display: flex; align-items: center; gap: 12px; }

/* Statuso Ženkliukai */
.tf-status-red { color: #ef4444; font-weight: 700; background: rgba(239, 68, 68, 0.1); padding: 4px 10px; border-radius: 6px; font-size: 11px; display: inline-block; white-space: nowrap; border: 1px solid rgba(239, 68, 68, 0.2); }
.tf-status-green { color: #10b981; font-weight: 700; background: rgba(16, 185, 129, 0.1); padding: 4px 10px; border-radius: 6px; font-size: 11px; display: inline-block; white-space: nowrap; border: 1px solid rgba(16, 185, 129, 0.2); }
.tf-status-blue { color: #3b82f6; font-weight: 700; background: rgba(59, 130, 246, 0.1); padding: 4px 10px; border-radius: 6px; font-size: 11px; display: inline-block; white-space: nowrap; border: 1px solid rgba(59, 130, 246, 0.2); }
.tf-status-gray { color: #64748b; font-weight: 700; background: rgba(100, 116, 139, 0.1); padding: 4px 10px; border-radius: 6px; font-size: 11px; display: inline-block; white-space: nowrap; border: 1px solid rgba(100, 116, 139, 0.2); }

/* Veiksmų Mygtukai */
.tf-doc-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tf-inline-form { margin: 0; display: inline-flex; align-items: center; }

.tf-action-btn, .tf-link-btn { background: var(--tf-bg-box); color: var(--tf-text-main); border: 1px solid var(--tf-border); padding: 6px 12px; border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 700; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.tf-action-btn:hover, .tf-link-btn:hover { filter: brightness(0.95); transform: translateY(-1px); }

.btn-doc { background: var(--tf-bg-card); color: var(--tf-primary); border-color: var(--tf-primary); }
.btn-doc:hover { background: var(--tf-primary); color: white; }
.btn-green { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.btn-green:hover { background: #10b981; color: white; }
.btn-gen { background: rgba(245, 158, 11, 0.1); color: #b45309; border-color: rgba(245, 158, 11, 0.3); }
.btn-gen:hover { background: #f59e0b; color: white; border-color: #f59e0b; }
.btn-archive { background: rgba(100, 116, 139, 0.1); color: #64748b; border-color: rgba(100, 116, 139, 0.3); }
.btn-archive:hover { background: #64748b; color: white; }

.tf-link-btn.chat-unread { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.05); }
.tf-link-btn.chat-unread:hover { background: #ef4444; color: white; }

.tf-doc-meta { font-size: 12px; color: var(--tf-text-muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 2px; }

.tf-empty { padding: 25px; text-align: center; color: var(--tf-text-muted); font-size: 14px; background: var(--tf-bg-card); border: 2px dashed var(--tf-border); border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.tf-wait-text { color: var(--tf-text-muted); font-size: 12px; font-style: italic; margin-left: 5px; }
.hidden-row { display: none !important; }