/* ====================================================
   NAUJOS SASKAITOS (BE SUTARTIES) STILIUS
   ==================================================== */

.tf-ninv-header { margin-bottom: 24px; }
.tf-ninv-header h3 { margin: 0 0 6px 0; font-size: 24px; color: var(--tf-text-heading); letter-spacing: -0.5px; font-weight: 800; }
.tf-ninv-header p { margin: 0; color: var(--tf-text-muted); font-size: 14px; }

.tf-ninv-layout { width: 100%; max-width: none; display: grid; grid-template-columns: minmax(360px, 2fr) minmax(520px, 3fr); gap: 24px; align-items: start; }
.tf-ninv-card { background: var(--tf-bg-card); padding: 30px; border-radius: 14px; border: 1px solid var(--tf-border); box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.tf-ninv-preview-card { background: var(--tf-bg-card); padding: 22px; border-radius: 14px; border: 1px solid var(--tf-border); box-shadow: 0 4px 15px rgba(0,0,0,0.02); position: sticky; top: 24px; }
.tf-ninv-preview-header { margin-bottom: 16px; }
.tf-ninv-preview-header h4 { margin: 0 0 6px 0; font-size: 18px; color: var(--tf-text-heading); font-weight: 800; }
.tf-ninv-preview-header p { margin: 0; font-size: 13px; color: var(--tf-text-muted); }
.tf-ninv-preview-frame { width: 100%; height: 880px; border: 1px solid var(--tf-border); border-radius: 12px; background: #fff; }
.tf-ninv-preview-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.tf-ninv-preview-empty { min-height: 320px; border: 1px dashed var(--tf-border); border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; color: var(--tf-text-muted); background: var(--tf-bg-box); }
.tf-ninv-preview-empty-title { font-size: 16px; font-weight: 800; color: var(--tf-text-heading); margin-bottom: 8px; }

.tf-ninv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tf-ninv-group { margin-bottom: 16px; }
.tf-ninv-group:last-child { margin-bottom: 0; }
.tf-ninv-group label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--tf-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.tf-ninv-req { color: #ef4444; }

.tf-ninv-group > input,
.tf-ninv-group > select,
.tf-ninv-group > textarea,
.tf-ninv-card .ts-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--tf-border);
    border-radius: 10px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    color: var(--tf-text-main);
    background: var(--tf-input-bg);
    transition: all 0.2s ease;
    outline: none;
}

.tf-ninv-group > input,
.tf-ninv-group > select,
.tf-ninv-card .ts-control { height: 46px; }

.tf-ninv-group > textarea { min-height: 94px; resize: vertical; }

.tf-ninv-group > input:focus,
.tf-ninv-group > select:focus,
.tf-ninv-group > textarea:focus,
.tf-ninv-card .ts-control.focus {
    border-color: var(--tf-primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}

.tf-ninv-calc { font-size: 13px; color: var(--tf-text-muted); margin-top: 6px; }
.tf-ninv-calc span { font-weight: 700; }
.tf-ninv-calc #saskBendra { color: var(--tf-primary); }

.tf-ninv-rows { display: flex; flex-direction: column; gap: 10px; }
.tf-ninv-row { display: grid; grid-template-columns: 1.8fr 0.6fr 0.8fr auto; gap: 10px; align-items: center; }
.tf-ninv-add-row { margin-top: 10px; }

.tf-ninv-actions { margin-top: 20px; }
.tf-ninv-btn { padding: 13px 22px; border-radius: 10px; text-decoration: none !important; font-weight: 800; font-size: 14px; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; cursor: pointer; }
.tf-ninv-btn.primary { background: var(--tf-primary); color: #fff !important; box-shadow: 0 4px 6px rgba(37,99,235,0.2); }
.tf-ninv-btn.primary:hover { filter: brightness(0.9); transform: translateY(-1px); }
.tf-ninv-btn.secondary { background: transparent; color: var(--tf-primary) !important; border-color: var(--tf-primary); }
.tf-ninv-btn.secondary:hover { background: rgba(59,130,246,0.08); }
.tf-ninv-btn.danger { background: rgba(239, 68, 68, 0.08); color: #ef4444 !important; border-color: rgba(239, 68, 68, 0.2); padding: 10px 12px; }
.tf-ninv-btn.danger:hover { background: rgba(239, 68, 68, 0.16); }

.tf-ninv-success-msg { padding: 18px 22px; background: rgba(16, 185, 129, 0.1); border-radius: 12px; margin-bottom: 20px; border-left: 5px solid #10b981; }
.tf-ninv-success-title { font-size: 16px; font-weight: 600; color: #10b981; margin-bottom: 10px; }
.tf-ninv-success-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tf-ninv-error-msg { padding: 14px 18px; background: rgba(239, 68, 68, 0.1); color: #ef4444; border-radius: 12px; margin-bottom: 20px; border-left: 5px solid #ef4444; font-weight: 600; }

.tf-ninv-card .ts-dropdown { border-radius: 10px; border: 1px solid var(--tf-border); box-shadow: 0 10px 25px rgba(0,0,0,0.1); margin-top: 4px; }
.tf-ninv-card .ts-control input { border: none !important; box-shadow: none !important; height: auto !important; padding: 0 !important; background: transparent !important; }

@media (max-width: 720px) {
    .tf-ninv-layout { grid-template-columns: 1fr; }
    .tf-ninv-preview-card { position: static; order: -1; }
    .tf-ninv-preview-frame { height: 520px; }
    .tf-ninv-card { padding: 18px; }
    .tf-ninv-grid { grid-template-columns: 1fr; gap: 0; }
    .tf-ninv-row { grid-template-columns: 1fr; }
    .tf-ninv-row-remove { width: 100%; }
}
