/* ========================================
   MODUL 3 - REGISTRU DE CASĂ
   Stiluri pentru monetar și registru
   ======================================== */

.modul3-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Modul 3 */
.modul3-header {
    background: #ffffff;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}

.modul3-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488 0%, #14b8a6 40%, #99f6e4 100%);
}

.modul3-header-content {
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modul3-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modul3-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1.5px solid #99f6e4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d9488;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}

.modul3-brand-text {
    min-width: 0;
}

.modul3-title-text {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.modul3-subtitle-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    margin-top: 4px;
}

.modul3-title h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modul3-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    font-weight: 400;
}

.modul3-date {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.m3-date-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 12px 6px 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.m3-date-card:hover {
    border-color: #2dd4bf;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
    transform: translateY(-1px);
}

.m3-date-card:active {
    transform: translateY(0);
}

.m3-date-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1px solid #99f6e4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d9488;
    flex-shrink: 0;
    transition: all 0.2s;
}

.m3-date-card:hover .m3-date-icon {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
}

.m3-date-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.m3-date-day {
    font-size: 9px;
    font-weight: 600;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.m3-date-value {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.m3-date-chevron {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    margin-left: -2px;
}

.m3-date-card:hover .m3-date-chevron {
    color: #0d9488;
    transform: translateY(1px);
}

.m3-date-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid #99f6e4;
    border-radius: 10px;
    background: #f0fdfa;
    color: #0f766e;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.m3-date-today-btn:hover {
    background: #ccfbf1;
    border-color: #2dd4bf;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
    transform: translateY(-1px);
}

.m3-date-today-btn:active {
    transform: translateY(0);
}

/* Tabs */
.modul3-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 20px;
}

.modul3-body {
    padding: 4px 0 0;
}

.modul3-tab {
    flex: 1;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.modul3-tab:hover {
    background: #f1f5f9;
    color: #334155;
}

.modul3-tab.active {
    color: #0d9488;
    border-bottom-color: #0d9488;
    background: white;
}

.tab-icon {
    font-size: 20px;
}

.tab-label {
    font-size: 14px;
}

/* Tab Content */
.modul3-tab-content {
    padding: 32px;
    min-height: 400px;
}

/* ========================================
   MONETAR STYLES
   ======================================== */

.monetar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.monetar-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.monetar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.monetar-total {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.monetar-total strong {
    font-size: 20px;
    font-weight: 800;
}

/* Monetar Grid */
.monetar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.monetar-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.monetar-item:hover {
    border-color: #0d9488;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.monetar-item.bancnota {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.monetar-item.moneda {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #818cf8;
}

.monetar-valor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.monetar-icon {
    font-size: 28px;
}

.monetar-simbol {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.monetar-input-group {
    margin-bottom: 12px;
}

.monetar-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.monetar-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.monetar-input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.monetar-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 8px;
}

.monetar-total-item label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.monetar-total-item span {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

/* Monetar Summary */
.monetar-summary {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 18px;
}

.summary-row span {
    font-weight: 600;
}

.summary-value {
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   REGISTRU STYLES
   ======================================== */

.registru-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.registru-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.registru-data {
    font-size: 16px;
    font-weight: 600;
    color: #0d9488;
    background: #eff6ff;
    padding: 8px 16px;
    border-radius: 8px;
}

.registru-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Registru Section */
.registru-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.registru-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.registru-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.registru-section-header h4 {
    margin: 0;
}

.registru-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.registru-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: right;
}

.registru-input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.registru-label {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
}

.registru-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.registru-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.registru-value.negative {
    color: #dc2626;
}

.registru-value.positive {
    color: #16a34a;
}

/* Cheltuieli */
.empty-cheltuieli {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-style: italic;
}

.cheltuieli-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cheltuiala-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cheltuiala-item:hover {
    border-color: #0d9488;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.cheltuiala-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cheltuiala-descriere {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.cheltuiala-data {
    font-size: 12px;
    color: #94a3b8;
}

.cheltuiala-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cheltuiala-suma {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}

.btn-delete-cheltuiala {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-delete-cheltuiala:hover {
    background: #fecaca;
    transform: scale(1.1);
}

.cheltuieli-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    font-size: 16px;
}

.cheltuieli-total strong {
    font-size: 18px;
    font-weight: 800;
}

/* Registru Final */
.registru-final {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.registru-calcul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calcul-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    font-size: 15px;
}

.calcul-row.positive {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.calcul-row.negative {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.calcul-row.final {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    padding: 16px;
    font-size: 18px;
    border: none;
    margin-top: 8px;
}

.calcul-row.final strong {
    font-size: 24px;
    font-weight: 800;
}

.calcul-separator {
    height: 2px;
    background: #e2e8f0;
    margin: 8px 0;
}

/* Registru Actions */
.registru-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* Button Styles */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1200px) {
    .monetar-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .modul3-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .modul3-header {
        padding: 20px;
    }
    
    .modul3-title h2 {
        font-size: 22px;
    }
    
    .modul3-tabs {
        padding: 0;
        flex-direction: column;
    }
    
    .modul3-tab {
        border-bottom: 1px solid #e2e8f0;
        border-left: 3px solid transparent;
        justify-content: flex-start;
        padding: 14px 20px;
    }
    
    .modul3-tab.active {
        border-bottom-color: #e2e8f0;
        border-left-color: #0d9488;
    }
    
    .modul3-tab-content {
        padding: 20px;
    }
    
    .monetar-grid {
        grid-template-columns: 1fr;
    }
    
    .monetar-header,
    .registru-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .monetar-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .monetar-actions button {
        width: 100%;
    }
    
    .cheltuiala-item {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .cheltuiala-actions {
        justify-content: space-between;
    }

    .registru-wrap {
        max-width: 100%;
    }

    .rt-label {
        white-space: normal;
        font-size: 12px;
    }

    .rt-value {
        min-width: 100px;
        font-size: 14px;
    }

    .rt-diferenta-value {
        font-size: 15px;
    }

    .rt-total-value {
        font-size: 15px;
    }
}

/* ── Print-only document header (hidden on screen) ── */
.print-doc-header,
.print-doc-footer {
    display: none;
}

@media print {
    /* ── Hide all UI chrome ── */
    .modul3-header,
    .modul3-tabs,
    .modul3-subtitle,
    .monetar-header-row,
    .registru-print-row,
    .monetar-actions,
    .registru-actions,
    .btn-delete-cheltuiala,
    .btn,
    .rt-btn-add,
    .rt-ch-del,
    .registru-section-header button {
        display: none !important;
    }

    /* ── Show print header ── */
    @page {
        size: A4 portrait;
        margin: 15mm 12mm;
    }

    .print-doc-header {
        display: block !important;
        padding: 0 0 16px 0;
        margin-bottom: 20px;
        border-bottom: 2px solid #1e293b;
    }

    .print-doc-top {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 8px;
    }

    .print-doc-company {
        font-size: 16px;
        font-weight: 800;
        color: #000;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    .print-doc-date {
        font-size: 12px;
        font-weight: 600;
        color: #333;
    }

    .print-doc-title {
        font-size: 20px;
        font-weight: 800;
        color: #000;
        text-align: center;
        letter-spacing: 2px;
        margin: 12px 0 4px;
    }

    .print-doc-person {
        text-align: center;
        font-size: 11px;
        color: #555;
    }

    /* ── Print signature footer — disabled ── */
    .print-doc-footer {
        display: none !important;
    }

    /* ── Container reset ── */
    .modul3-container {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: white !important;
    }

    .modul3-body {
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .monetar-section {
        padding: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* ── Monetar table print ── */
    .monetar-table-wrap {
        max-width: 55% !important;
        margin: 0 auto !important;
        border: 1.5px solid #000 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: white !important;
    }

    .monetar-table {
        width: 100% !important;
    }

    .monetar-table thead {
        border-bottom: 1.5px solid #000 !important;
    }

    .monetar-table th {
        padding: 6px 8px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #000 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .mt-row td {
        padding: 5px 8px !important;
        font-size: 12px !important;
        color: #000 !important;
        border-bottom: 0.5px solid #ccc !important;
    }

    .mt-row.has-value {
        background: none !important;
    }

    .mt-tip {
        font-size: 10px !important;
    }

    .mt-valoare {
        font-weight: 600 !important;
    }

    /* Replace input with its value on print */
    .mt-input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #000 !important;
        text-align: center !important;
        padding: 0 !important;
        width: 40px !important;
        -moz-appearance: textfield !important;
    }

    .mt-input::-webkit-outer-spin-button,
    .mt-input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
    }

    .mt-total {
        font-weight: 700 !important;
        color: #000 !important;
    }

    /* Total row */
    .mt-total-row {
        border-top: 2px solid #000 !important;
    }

    .mt-total-label {
        font-size: 13px !important;
        font-weight: 800 !important;
        color: #000 !important;
    }

    .mt-total-value {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #000 !important;
    }

    /* ── Registru table print ── */
    .registru-wrap {
        max-width: 75% !important;
        margin: 0 auto !important;
    }

    .registru-table-wrap {
        max-width: 100% !important;
        margin: 0 auto !important;
        border: 1.5px solid #000 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: white !important;
    }

    .registru-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .rt-row td {
        padding: 8px 14px !important;
        font-size: 13px !important;
        color: #000 !important;
        border-bottom: 1px solid #ccc !important;
    }

    .rt-label {
        font-weight: 600 !important;
        color: #000 !important;
        text-align: left !important;
        width: 60% !important;
    }

    .rt-value,
    .rt-value-cell {
        color: #000 !important;
        font-weight: 700 !important;
        text-align: right !important;
        font-size: 14px !important;
        width: 40% !important;
    }

    .rt-plus .rt-label,
    .rt-plus .rt-value { color: #000 !important; }
    .rt-minus .rt-label,
    .rt-minus .rt-value { color: #000 !important; }

    .rt-input {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #000 !important;
        padding: 0 !important;
        float: none !important;
        text-align: right !important;
        width: 100% !important;
        -webkit-appearance: none !important;
        -moz-appearance: textfield !important;
    }

    .rt-btn-add {
        display: none !important;
    }

    .rt-cheltuieli-label {
        display: block !important;
    }

    .rt-ch-del {
        display: none !important;
    }

    .rt-ch-item {
        background: none !important;
        padding: 3px 0 !important;
        border-bottom: 0.5px dotted #aaa !important;
        display: flex !important;
        justify-content: space-between !important;
    }

    .rt-ch-desc { color: #333 !important; font-size: 11px !important; }
    .rt-ch-suma { color: #000 !important; font-weight: 600 !important; font-size: 11px !important; }

    .rt-cash-row td {
        border-top: 1px solid #999 !important;
        background: none !important;
    }
    .rt-cash-row .rt-label { color: #333 !important; font-style: italic !important; }
    .rt-cash-row .rt-value { color: #000 !important; }

    .rt-total-row {
        border-top: 2.5px solid #000 !important;
    }

    .rt-total-row td {
        padding: 10px 14px !important;
    }

    .rt-total-label {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #000 !important;
    }

    .rt-total-value {
        font-size: 17px !important;
        font-weight: 800 !important;
        color: #000 !important;
    }

    .rt-diferenta-row {
        border-top: 1.5px solid #000 !important;
        background: none !important;
    }

    .rt-diferenta-row td {
        padding: 10px 14px !important;
    }

    .rt-diferenta-label {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #000 !important;
    }

    .rt-diferenta-value {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #000 !important;
    }

    .rt-diferenta-row.perfect { background: none !important; }
    .rt-diferenta-row.surplus { background: none !important; }
    .rt-diferenta-row.lipsa { background: none !important; }

    /* Page setup */
    .modul3-container {
        page-break-inside: avoid;
    }
}

/* ============================================
   MONETAR TABLE LAYOUT (format chitanțier)
   ============================================ */

.monetar-section {
    padding: 0 24px 24px;
    position: relative;
}

.monetar-header-row {
    position: absolute;
    top: 4px;
    right: 24px;
    z-index: 1;
}

.monetar-header-row h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.monetar-table-wrap {
    max-width: 340px;
    margin: 0 auto 12px;
    background: #fafbff;
    border: 1.5px solid #d0d7e3;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 4px rgba(100, 116, 152, 0.08);
    overflow: hidden;
}

.monetar-table {
    width: 100%;
    border-collapse: collapse;
}

/* Column widths */
.monetar-table thead {
    border-bottom: 1.5px solid #d0d7e3;
    background: #f1f4f8;
}

.monetar-table th {
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.mt-col-tip { width: 36px; text-align: center; }
.mt-col-val { text-align: left; }
.mt-col-cant { width: 64px; text-align: center; }
.mt-col-total { width: 80px; text-align: right; }

/* Row styles */
.mt-row td {
    padding: 4px 10px;
    vertical-align: middle;
    font-size: 13px;
    color: #334155;
}

.mt-row + .mt-row {
    border-top: 1px solid #edf0f4;
}

.mt-row.has-value {
    background: #f0fdf4;
}

.mt-tip { text-align: center; font-size: 14px; }
.mt-valoare { font-weight: 500; }
.mt-cantitate { text-align: center; }
.mt-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.mt-input-cell {
    width: 70px;
}

.mt-input {
    width: 48px;
    padding: 3px 4px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    background: white;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}

.mt-input::-webkit-outer-spin-button,
.mt-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mt-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fefffe;
}

.mt-label {
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.mt-label strong {
    color: #1e293b;
}

.mt-eq {
    text-align: center;
    width: 30px;
    font-weight: 600;
    color: #94a3b8;
    font-size: 15px;
}

.mt-result {
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    min-width: 90px;
    font-variant-numeric: tabular-nums;
}

/* Total row */
.monetar-total-row td {
    padding-top: 8px;
}

.monetar-total-row {
    border-top: 2px solid #6366f1 !important;
}

.mt-total-label {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.8px;
    padding: 8px 10px !important;
}

.mt-total-value {
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    color: #4f46e5;
    font-variant-numeric: tabular-nums;
    padding: 8px 10px !important;
}

/* ============================================
   REGISTRU DE CASĂ - TABLE LAYOUT
   ============================================ */
.registru-wrap {
    max-width: 420px;
    margin: 0 auto 12px;
}

.registru-table-wrap {
    background: #fafbff;
    border: 1.5px solid #d0d7e3;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 4px rgba(100, 116, 152, 0.08);
    overflow: hidden;
}

.registru-table {
    width: 100%;
    border-collapse: collapse;
}

.rt-row td {
    padding: 6px 10px;
    vertical-align: middle;
    font-size: 13px;
    color: #334155;
}

.rt-row + .rt-row {
    border-top: 1px solid #e8ecf2;
}

.rt-label {
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}

.rt-value {
    text-align: right;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    min-width: 120px;
}

.rt-value-cell {
    text-align: right;
    min-width: 120px;
}

.rt-input {
    width: 130px;
    padding: 5px 8px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    background: white;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s, box-shadow 0.2s;
    float: right;
}

.rt-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Plus / Minus row colors */
.rt-plus .rt-label { color: #15803d; }
.rt-plus .rt-value { color: #15803d; }
.rt-minus .rt-label { color: #dc2626; }
.rt-minus .rt-value { color: #dc2626; }

/* Cheltuieli label with add button */
.rt-cheltuieli-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rt-btn-add {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #22c55e;
    background: #f0fdf4;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.rt-btn-add:hover {
    background: #22c55e;
    color: white;
}

/* Cheltuieli detail rows */
.rt-detail-row td {
    padding: 0 6px 6px !important;
}

.rt-detail-cell {
    padding: 0 !important;
}

.rt-cheltuieli-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px 0;
}

.rt-ch-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: #fef2f2;
    border-radius: 4px;
    font-size: 12px;
}

.rt-ch-desc {
    flex: 1;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-ch-suma {
    font-weight: 600;
    color: #dc2626;
    font-variant-numeric: tabular-nums;
}

.rt-ch-del {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.rt-ch-del:hover {
    color: #dc2626;
}

/* Total row */
.rt-total-row {
    border-top: 2px solid #6366f1 !important;
}

.rt-total-row td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.rt-total-label {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.8px;
}

.rt-total-value {
    text-align: right;
    font-size: 16px;
    font-weight: 800;
    color: #4f46e5;
    font-variant-numeric: tabular-nums;
}

/* Cash row */
.rt-cash-row {
    border-top: 1px solid #e8ecf2;
}

.rt-cash-row .rt-label {
    color: #64748b;
    font-size: 13px;
}

.rt-cash-row .rt-value {
    color: #475569;
    font-size: 14px;
}

/* Diferenta row */
.rt-diferenta-row {
    border-top: 2px solid #94a3b8 !important;
}

.rt-diferenta-row td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.rt-diferenta-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rt-diferenta-value {
    text-align: right;
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.rt-diferenta-row.perfect .rt-diferenta-label,
.rt-diferenta-row.perfect .rt-diferenta-value { color: #15803d; }
.rt-diferenta-row.perfect { background: #f0fdf4; }

.rt-diferenta-row.surplus .rt-diferenta-label,
.rt-diferenta-row.surplus .rt-diferenta-value { color: #dc2626; font-weight: 800; }
.rt-diferenta-row.surplus { background: #fef2f2; }

.rt-diferenta-row.lipsa .rt-diferenta-label,
.rt-diferenta-row.lipsa .rt-diferenta-value { color: #dc2626; }
.rt-diferenta-row.lipsa { background: #fef2f2; }

/* Print button */
.registru-print-row {
    text-align: center;
    margin-top: 16px;
    padding-bottom: 20px;
}