/* ==========================================================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --accent: #5925f2;          /* Royal Indigo/Purple from user example */
    --accent-light: #ece7ff;
    --accent-dark: #3f15c7;
    --accent-glow: rgba(89, 37, 242, 0.15);
    
    --bg-main: #f8fafc;         /* Light neutral canvas */
    --bg-sidebar: #ffffff;      /* Pure white panel background */
    --bg-card: #f1f5f9;         /* Subdued panels */
    
    --text-main: #1e293b;       /* Charcoal grey for readability */
    --text-muted: #64748b;      /* Slate grey for subtext */
    --text-white: #ffffff;
    
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    
    --success: #10b981;         /* Emerald Green */
    --success-hover: #059669;
    --danger: #ef4444;          /* Red */
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Elevation / Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.08);
    --shadow-premium: 0 20px 25px -5px rgba(89, 37, 242, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   RESET & BASICS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
    display: grid;
    grid-template-columns: 460px 1fr;
    min-height: 100vh;
}

@media (max-width: 1100px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        max-height: 500px;
        overflow-y: auto;
        border-right: none !important;
        border-bottom: 2px solid var(--border-light);
        height: auto !important;
    }
}

/* ==========================================================================
   CONTROL PANEL / EDITOR SIDEBAR
   ========================================================================== */
.control-panel {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #faf9ff 100%);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-sidebar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 8px;
    background-color: transparent;
}

.brand-logo-sidebar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-icon {
    font-size: 24px;
    color: var(--accent);
    background: var(--accent-light);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

.logo-area p {
    font-size: 10px;
    color: var(--text-muted);
}

/* Form Scroll Area */
.form-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Form Sections */
.form-section {
    background-color: #fafbfd;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-section:focus-within {
    border-color: var(--accent);
    box-shadow: var(--accent-glow);
}

.highlight-section {
    background: linear-gradient(135deg, var(--accent-light) 0%, #ffffff 100%) !important;
    border: 1.5px solid var(--accent) !important;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

/* Inputs & Form Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 13px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
}

.form-subtext {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.2;
}

/* Action Area in Sidebar */
.panel-actions {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.02);
}

/* Preset Buttons */
.presets-container {
    margin-bottom: 15px;
    background-color: var(--accent-light);
    padding: 10px;
    border-radius: 8px;
}

.presets-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 6px;
}

.preset-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-preset {
    font-size: 10px !important;
    padding: 5px 8px !important;
    background-color: #ffffff !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

.btn-preset:hover {
    background-color: var(--accent) !important;
    color: white !important;
}

.item-builder-box {
    background-color: #ffffff;
    border: 1px dashed var(--accent);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

/* Added items small preview list in side panel */
.editor-items-list {
    margin-top: 15px;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
}

.editor-items-list h3 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.items-list-indicator {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.empty-list-msg {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.editor-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.editor-item-row .item-title {
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-item-row .item-price-tag {
    color: var(--accent-dark);
    font-weight: 700;
    margin-left: auto;
    margin-right: 15px;
}

.btn-delete-item {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 2px;
    font-size: 12px;
}

.btn-delete-item:hover {
    opacity: 0.8;
}

/* ==========================================================================
   ARCHIVED DOCUMENTS LIST (HISTORY)
   ========================================================================== */
.archive-list-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: #ffffff;
    padding: 8px;
}

.archive-status-msg {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 10px 0;
}

.archive-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-light);
    font-size: 11px;
    transition: all 0.2s ease;
}

.archive-item:hover {
    background-color: var(--accent-light);
    border-color: var(--accent);
}

.archive-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 80%;
}

.archive-filename {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-filename:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.archive-meta {
    font-size: 9px;
    color: var(--text-muted);
}

.btn-archive-open {
    color: var(--accent-dark);
    background: white;
    border: 1px solid var(--border-color);
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
}

.btn-archive-open:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ==========================================================================
   BUTTONS SYSTEM
   ========================================================================== */
.btn {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    box-shadow: 0 4px 10px var(--accent-glow);
}

.btn-secondary {
    background-color: var(--accent-light);
    color: var(--accent-dark);
}

.btn-secondary:hover {
    background-color: #ded6ff;
}

.btn-success {
    background-color: var(--success);
    color: var(--text-white);
}

.btn-success:hover {
    background-color: var(--success-hover);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    background-color: var(--bg-card);
    color: var(--text-main);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* ==========================================================================
   LIVE PREVIEW SIDE
   ========================================================================== */
.preview-panel {
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    height: 100vh;
}

/* Page Layout for screen display */
.invoice-sheet {
    background-color: #ffffff;
    width: 100%;
    max-width: 800px;
    min-height: 1024px;
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-light);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Document Type Watermark Overlay */
.document-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 900;
    color: rgba(89, 37, 242, 0.04);
    border: 5px solid rgba(89, 37, 242, 0.04);
    padding: 8px 25px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    display: flex;
    white-space: nowrap;
}

/* Watermark Status Tag */
.invoice-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 10px;
    background-color: var(--accent-light);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}

/* ==========================================================================
   INVOICE SHEET DESIGN
   ========================================================================== */

/* Header section */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 25px;
    position: relative;
    z-index: 2;
}

.company-branding {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 65%;
}

.brand-logo-preview {
    height: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background-color: transparent;
}

.brand-logo-preview img {
    height: 100%;
    max-width: 180px;
    object-fit: contain;
}

/* Style the fallback icon only if image fails */
.brand-placeholder-icon {
    font-size: 26px;
    color: white;
    background-color: var(--accent);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.company-details-text h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.tagline-info {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-dark);
    margin-bottom: 4px;
}

.company-details-text p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.invoice-meta-header {
    text-align: right;
}

.invoice-meta-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
}

.meta-table {
    border-collapse: collapse;
    margin-left: auto;
}

.meta-table th {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: right;
    padding: 2px 8px;
}

.meta-table td {
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    padding: 2px 0 2px 8px;
}

/* Receipt narrative block */
.receipt-narrative-box {
    background-color: var(--accent-light);
    border-left: 5px solid var(--accent);
    padding: 18px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 25px;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.receipt-narrative-box strong {
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Billing Parties */
.billing-parties-grid {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.billing-party h3 {
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.party-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.party-company {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-dark);
}

.party-address {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    max-width: 320px;
}

.party-contact {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.party-contact span {
    display: block;
}

.party-tax {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 4px;
}

/* Items Table */
.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.invoice-items-table th {
    background-color: var(--bg-card);
    color: var(--text-main);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    border-top: 1px solid var(--border-color);
    border-bottom: 2px solid var(--accent);
}

.invoice-items-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    vertical-align: top;
}

.col-num { width: 35px; text-align: center; }
.col-desc { min-width: 250px; }
.col-sub { width: 150px; font-size: 10px !important; color: var(--text-muted); }
.col-price { width: 90px; }
.col-qty { width: 50px; }
.col-total { width: 105px; }

.item-main-title {
    font-weight: 700;
    color: var(--text-main);
}

.item-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.item-badge-sub {
    display: inline-block;
    background-color: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-top: 3px;
}

/* Invoice Summary Grid (Payment vs Pricing Breakdown) */
.invoice-summary-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    margin-top: auto; /* Pushes to bottom */
    padding-top: 15px;
    position: relative;
    z-index: 2;
}

.pre-wrap {
    white-space: pre-wrap;
    font-family: inherit;
}

/* Payment Instructions Left Box */
.payment-instructions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-details-box h4 {
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
}

.payment-details-box div {
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-muted);
    background-color: var(--bg-main);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

/* UPI QR Code Area */
.qr-payment-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #faf9ff;
    border: 1px solid var(--accent-light);
    padding: 10px;
    border-radius: 8px;
}

.qr-box {
    width: 65px;
    height: 65px;
    background-color: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-box img {
    max-width: 100%;
    max-height: 100%;
}

.qr-text {
    display: flex;
    flex-direction: column;
}

.qr-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
}

.qr-subtitle {
    font-size: 9px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 1px;
}

/* Pricing Summary Box */
.pricing-breakdown {
    display: flex;
    justify-content: flex-end;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th {
    text-align: right;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
}

.summary-table td {
    text-align: right;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-main);
    padding: 4px 0 4px 10px;
    width: 110px;
}

.text-discount {
    color: var(--success) !important;
}

.total-row th {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    border-top: 2px solid var(--border-color);
    padding: 10px 10px 0 10px;
}

.total-row td {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-dark);
    border-top: 2px solid var(--border-color);
    padding: 8px 0 0 10px;
}

/* Terms & Notes Footer */
.invoice-footer-notes {
    margin-top: 30px;
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
    position: relative;
    z-index: 2;
}

.notes-box h4 {
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
}

.notes-box div {
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-muted);
}

.thank-you-msg {
    margin-top: 20px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
}

/* Helpers */
.hidden-element {
    display: none !important;
}

/* ==========================================================================
   PRINT STYLES (@media print)
   ========================================================================== */
@media print {
    /* Hide everything that isn't the invoice sheet */
    body, html {
        background-color: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
    }

    .app-container {
        display: block !important;
        min-height: auto !important;
    }

    .no-print {
        display: none !important;
    }

    .preview-panel {
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .invoice-sheet {
        box-shadow: none !important;
        border: none !important;
        padding: 20px !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        min-height: auto !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    .invoice-items-table th {
        background-color: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .payment-details-box div, .qr-payment-container {
        background-color: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .receipt-narrative-box {
        background-color: #ece7ff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .document-watermark {
        color: rgba(89, 37, 242, 0.05) !important;
        border-color: rgba(89, 37, 242, 0.05) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Keep table margins safe from clipping */
    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }
}

/* ==========================================================================
   MODAL DIALOG / ONBOARDING SETUP SYSTEM
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6); /* dark slate overlay */
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-light) 0%, #ffffff 100%);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s ease;
}

.btn-close-modal:hover {
    color: var(--danger);
}

.modal-form {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-intro {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    background-color: var(--bg-main);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.modal-actions-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
    margin-top: 10px;
}
