/* ====================================================
   MODERNUS "MANO DOKUMENTAI" STILIUS V2.1 (Horizontalios kortelės)
   ==================================================== */

/* Headeris */
.tf-header-client { margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--tf-border); display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.tf-header-client h3 { margin: 0 0 8px 0; font-size: 26px; color: var(--tf-text-heading); letter-spacing: -0.5px; font-weight: 800; }
.tf-header-client p { margin: 0; color: var(--tf-text-muted); font-size: 15px; }
.tf-client-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--tf-bg-box); padding: 10px 18px; border-radius: 12px; border: 1px solid var(--tf-border); font-size: 14px; font-weight: 700; color: var(--tf-primary); box-shadow: 0 2px 4px var(--tf-shadow); }

/* 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; }
.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); } }

/* Pagrindinis išdėstymas (Sticky Sidebar) */
.tf-modern-layout { display: flex; gap: 40px; align-items: flex-start; }
.tf-docs-column { flex: 1; min-width: 0; }
.tf-action-column { flex: 0 0 380px; position: sticky; top: 30px; }
@media (max-width: 1024px) {
    .tf-modern-layout { flex-direction: column; }
    .tf-action-column { flex: 1; width: 100%; position: static; }
}

/* ================== DOKUMENTŲ SĄRAŠAS ================== */
.tf-docs-list { display: flex; flex-direction: column; gap: 15px; margin-bottom: 40px; }

/* Kortelė dabar stakina viską vertikaliai (column) */
.tf-doc-row-card { background: var(--tf-bg-card); border: 1px solid var(--tf-border); border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 12px; transition: all 0.2s ease; }
.tf-doc-row-card:hover { border-color: var(--tf-primary); transform: translateX(4px); box-shadow: 0 6px 15px rgba(0,0,0,0.06); }

.tf-doc-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--tf-text-heading); line-height: 1.4; word-break: normal; overflow-wrap: break-word; width: 100%; }

/* Vidurinė eilutė: Kaina + Statusas + Mygtukai */
.tf-doc-middle-row { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; justify-content: space-between; }

.tf-doc-price-status { display: flex; align-items: center; gap: 15px; }
.tf-doc-price { font-size: 16px; font-weight: 800; color: var(--tf-text-heading); white-space: nowrap; }

.tf-doc-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tf-doc-actions a { background: var(--tf-bg-box); color: var(--tf-text-main); border: 1px solid var(--tf-border); padding: 8px 14px; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 700; transition: all 0.2s; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tf-doc-actions a:hover { background: var(--tf-primary); color: white; border-color: var(--tf-primary); }

.tf-status-red { color: #ef4444; font-weight: 700; background: rgba(239, 68, 68, 0.1); padding: 6px 12px; border-radius: 8px; font-size: 12px; display: inline-block; white-space: nowrap; }
.tf-status-green { color: #10b981; font-weight: 700; background: rgba(16, 185, 129, 0.1); padding: 6px 12px; border-radius: 8px; font-size: 12px; display: inline-block; white-space: nowrap; }

/* Meta laukai apačioje */
.tf-doc-meta { font-size: 13px; color: var(--tf-text-muted); display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.tf-doc-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Prisitaikymas mažiems ekranams (telefonams) */
@media (max-width: 900px) {
    .tf-doc-horizontal-group { flex-direction: column; align-items: flex-start; gap: 15px; }
    .tf-doc-price-status { justify-content: space-between; width: 100%; }
    .tf-doc-actions { width: 100%; justify-content: flex-start; }
    .tf-doc-actions a { flex: 1; text-align: center; }
}

/* ================== IŠSIŲSTŲ DOKUMENTŲ SĄRAŠAS ================== */
.tf-sent-list { display: flex; flex-direction: column; gap: 12px; }
.tf-sent-item { background: var(--tf-bg-card); border: 1px solid var(--tf-border); border-radius: 12px; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; gap: 15px; }
.tf-sent-item:hover { border-color: var(--tf-text-muted); }
.tf-sent-info { display: flex; flex-direction: column; gap: 4px; overflow: hidden; flex: 1; }
.tf-sent-name { font-size: 14px; font-weight: 700; color: var(--tf-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tf-sent-date { font-size: 12px; color: var(--tf-text-muted); }
.tf-sent-note { font-size: 13px; color: var(--tf-text-main); font-style: italic; background: var(--tf-bg-box); padding: 6px 10px; border-radius: 6px; margin-top: 5px; display: inline-block;}
.tf-sent-view { font-size: 12px; font-weight: 700; color: var(--tf-text-muted); text-decoration: none; background: var(--tf-bg-box); padding: 8px 12px; border-radius: 8px; transition: 0.2s; white-space: nowrap; }
.tf-sent-view:hover { background: var(--tf-text-muted); color: var(--tf-bg-card); }

/* ================== ĮKĖLIMO FORMA ================== */
.tf-upload-box { background: var(--tf-bg-card); padding: 35px; border-radius: 20px; border: 1px solid var(--tf-border); box-shadow: 0 10px 30px var(--tf-shadow); }
.tf-upload-box h4 { margin-top: 0; margin-bottom: 25px; font-size: 18px; color: var(--tf-text-heading); font-weight: 800; display: flex; align-items: center; gap: 10px; }

.tf-file-input-wrapper { border: 2px dashed var(--tf-primary); border-radius: 16px; padding: 40px 20px; text-align: center; cursor: pointer; transition: all 0.3s; background: rgba(37,99,235,0.03); margin-bottom: 25px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tf-file-input-wrapper:hover { background: rgba(37,99,235,0.08); border-color: #1d4ed8; transform: scale(1.02); }
.tf-file-input-wrapper input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tf-file-icon { font-size: 40px; margin-bottom: 15px; }
.tf-file-text { font-size: 15px; font-weight: 700; color: var(--tf-primary); }
.tf-file-hint { font-size: 12px; color: var(--tf-text-muted); margin-top: 8px; }

.tf-form-group { margin-bottom: 25px; }
.tf-form-group label { display: block; font-weight: 700; margin-bottom: 10px; color: var(--tf-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.tf-form-group textarea { width: 100%; padding: 15px; border: 1px solid var(--tf-border); border-radius: 12px; box-sizing: border-box; font-family: inherit; font-size: 14px; color: var(--tf-text-main); background: var(--tf-input-bg); transition: all 0.2s; outline: none; resize: vertical; min-height: 80px; }
.tf-form-group textarea:focus { border-color: var(--tf-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.tf-submit-btn { background: var(--tf-primary); color: white; padding: 16px; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s; width: 100%; display: flex; justify-content: center; gap: 10px; box-shadow: 0 4px 12px rgba(37,99,235,0.2); }
.tf-submit-btn:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }

/* CHAT MYGTUKAS */
.tf-main-chat-btn { background: #2563eb; color: white; border: none; padding: 12px 24px; border-radius: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); transition: all 0.3s ease; font-size: 15px; }
.tf-main-chat-btn:hover { transform: translateY(-2px); background: #1d4ed8; }
.tf-chat-icon-unread, .tf-chat-text-unread { display: none; }
.tf-chat-icon-normal { font-size: 18px; }
.tf-main-chat-btn.has-unread { background: #ef4444; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); animation: pulse-red-bg 2s infinite; }
.tf-main-chat-btn.has-unread .tf-chat-icon-normal, .tf-main-chat-btn.has-unread .tf-chat-text-normal { display: none; }
.tf-main-chat-btn.has-unread .tf-chat-icon-unread, .tf-main-chat-btn.has-unread .tf-chat-text-unread { display: inline-block; }
.tf-main-chat-btn.has-unread .tf-chat-icon-unread { font-size: 18px; animation: ring-bell 1.5s infinite; transform-origin: top center; }
@keyframes pulse-red-bg { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); } 70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes ring-bell { 0%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(15deg); } 20%, 40% { transform: rotate(-15deg); } 60% { transform: rotate(0); } }