/**
 * Expert Contab ERP - Custom Styles
 * Stiluri specifice aplicatiei
 */

/* ============================================================
   DASHBOARD
   ============================================================ */
.ec-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.ec-dashboard-widget {
    background: #fff;
    border: 1px solid #a4c8e8;
    border-radius: 5px;
    overflow: hidden;
}

.ec-dashboard-widget-header {
    background: linear-gradient(to bottom, #e8f1f9 0%, #d4e3f5 100%);
    padding: 10px 15px;
    border-bottom: 1px solid #a4c8e8;
    font-weight: bold;
    font-size: 12px;
    color: #1e395b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ec-dashboard-widget-body {
    padding: 15px;
}

/* Stats Cards */
.ec-stat-card {
    text-align: center;
    padding: 20px;
}

.ec-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2b5797;
    line-height: 1;
}

.ec-stat-label {
    font-size: 11px;
    color: #6b8aad;
    margin-top: 5px;
}

.ec-stat-change {
    font-size: 11px;
    margin-top: 8px;
}

.ec-stat-change.positive {
    color: #5bb75b;
}

.ec-stat-change.negative {
    color: #da4f49;
}

/* ============================================================
   SOCIETATE SELECTOR
   ============================================================ */
.ec-societate-selector {
    background: #f0f6fb;
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    padding: 8px 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ec-societate-selector label {
    font-weight: bold;
    font-size: 11px;
    color: #1e395b;
}

.ec-societate-selector select {
    flex: 1;
    max-width: 400px;
}

.ec-societate-info {
    font-size: 10px;
    color: #6b8aad;
}

/* ============================================================
   FACTURA STYLES
   ============================================================ */
.ec-factura {
    background: #fff;
    border: 1px solid #a4c8e8;
    padding: 20px;
}

.ec-factura-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2b5797;
}

.ec-factura-emitent {
    max-width: 45%;
}

.ec-factura-numar {
    text-align: right;
}

.ec-factura-numar h2 {
    font-size: 24px;
    color: #2b5797;
    margin-bottom: 10px;
}

.ec-factura-partener {
    background: #f5f9fc;
    border: 1px solid #d4e3f5;
    padding: 15px;
    margin-bottom: 20px;
}

.ec-factura-linii {
    margin-bottom: 20px;
}

.ec-factura-totaluri {
    display: flex;
    justify-content: flex-end;
}

.ec-factura-totaluri table {
    min-width: 300px;
}

.ec-factura-totaluri td {
    padding: 5px 10px;
}

.ec-factura-totaluri .total-final {
    font-size: 16px;
    font-weight: bold;
    background: #e8f1f9;
}

/* ============================================================
   NOTE CONTABILE
   ============================================================ */
.ec-nota-contabila {
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    margin-bottom: 15px;
}

.ec-nota-header {
    background: linear-gradient(to bottom, #e8f1f9 0%, #d4e3f5 100%);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #a4c8e8;
}

.ec-nota-body {
    padding: 15px;
}

.ec-articol-contabil {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: #fafcfe;
    border: 1px solid #e8f1f9;
    border-radius: 3px;
    margin-bottom: 10px;
}

.ec-articol-contabil .cont {
    width: 120px;
}

.ec-articol-contabil .suma {
    width: 150px;
}

.ec-articol-contabil .descriere {
    flex: 1;
}

/* ============================================================
   BALANTA
   ============================================================ */
.ec-balanta-filters {
    background: #f5f9fc;
    border: 1px solid #d4e3f5;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ec-balanta-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.ec-balanta-summary-item {
    background: #e8f1f9;
    padding: 12px;
    text-align: center;
    border-radius: 3px;
}

.ec-balanta-summary-item .value {
    font-size: 18px;
    font-weight: bold;
    color: #2b5797;
}

.ec-balanta-summary-item .label {
    font-size: 10px;
    color: #6b8aad;
}

/* ============================================================
   REGISTRU CASA / BANCA
   ============================================================ */
.ec-registru {
    margin-bottom: 15px;
}

.ec-registru-header {
    background: linear-gradient(to bottom, #2b5797 0%, #1e395b 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.ec-registru-header h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.ec-registru-sold {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f5f9fc;
    border: 1px solid #a4c8e8;
}

.ec-registru-sold .sold-item {
    text-align: center;
}

.ec-registru-sold .sold-value {
    font-size: 18px;
    font-weight: bold;
}

/* ============================================================
   SALARII
   ============================================================ */
.ec-stat-plata {
    overflow-x: auto;
}

.ec-fluturasi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

.ec-fluturas {
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    font-size: 10px;
}

.ec-fluturas-header {
    background: linear-gradient(to bottom, #2b5797 0%, #1e395b 100%);
    color: white;
    padding: 10px;
    text-align: center;
}

.ec-fluturas-body {
    padding: 10px;
}

.ec-fluturas-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dotted #d4e3f5;
}

.ec-fluturas-total {
    background: #e8f1f9;
    padding: 8px 10px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

/* ============================================================
   MIJLOACE FIXE
   ============================================================ */
.ec-mf-card {
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    margin-bottom: 15px;
}

.ec-mf-card-header {
    background: linear-gradient(to bottom, #e8f1f9 0%, #d4e3f5 100%);
    padding: 10px 15px;
    border-bottom: 1px solid #a4c8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ec-mf-card-body {
    padding: 15px;
}

.ec-mf-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.ec-mf-info-item {
    padding: 10px;
    background: #f5f9fc;
    border-radius: 3px;
}

.ec-mf-info-item label {
    font-size: 10px;
    color: #6b8aad;
    display: block;
    margin-bottom: 3px;
}

.ec-mf-info-item .value {
    font-size: 13px;
    font-weight: bold;
    color: #1e395b;
}

.ec-amortizare-bar {
    height: 20px;
    background: #e8f1f9;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.ec-amortizare-progress {
    height: 100%;
    background: linear-gradient(to right, #5bb75b 0%, #8dd38d 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* ============================================================
   DECLARATII FISCALE
   ============================================================ */
.ec-declaratii-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ec-declaratie-card {
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ec-declaratie-card:hover {
    border-color: #2b5797;
    box-shadow: 0 2px 8px rgba(43, 87, 151, 0.2);
}

.ec-declaratie-card .icon {
    font-size: 36px;
    color: #2b5797;
    margin-bottom: 10px;
}

.ec-declaratie-card .name {
    font-weight: bold;
    margin-bottom: 5px;
}

.ec-declaratie-card .description {
    font-size: 10px;
    color: #6b8aad;
}

/* ============================================================
   RAPOARTE
   ============================================================ */
.ec-raport-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ec-raport-preview {
    background: #fff;
    border: 1px solid #a4c8e8;
    min-height: 500px;
    padding: 20px;
}

/* ============================================================
   CALENDAR / DATE PICKER
   ============================================================ */
.ec-calendar {
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    background: #fff;
    width: 250px;
}

.ec-calendar-header {
    background: linear-gradient(to bottom, #2b5797 0%, #1e395b 100%);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ec-calendar-nav {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
}

.ec-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 5px;
}

.ec-calendar-day {
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
}

.ec-calendar-day:hover {
    background: #f0f6fb;
}

.ec-calendar-day.today {
    background: #fce38e;
    font-weight: bold;
}

.ec-calendar-day.selected {
    background: #2b5797;
    color: white;
}

.ec-calendar-day.other-month {
    color: #a4c8e8;
}

/* ============================================================
   AUTOCOMPLETE
   ============================================================ */
.ec-autocomplete {
    position: relative;
}

.ec-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #a4c8e8;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.ec-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 11px;
    border-bottom: 1px solid #e8f1f9;
}

.ec-autocomplete-item:hover,
.ec-autocomplete-item.highlighted {
    background: #f0f6fb;
}

.ec-autocomplete-item .code {
    font-weight: bold;
    color: #2b5797;
    margin-right: 8px;
}

/* ============================================================
   ICONS (Unicode/Emoji pentru prototip)
   ============================================================ */
.icon-dashboard::before { content: '📊'; }
.icon-societate::before { content: '🏢'; }
.icon-contabilitate::before { content: '📒'; }
.icon-parteneri::before { content: '👥'; }
.icon-clienti::before { content: '🤝'; }
.icon-furnizori::before { content: '📦'; }
.icon-documente::before { content: '📄'; }
.icon-factura::before { content: '🧾'; }
.icon-gestiune::before { content: '📦'; }
.icon-stoc::before { content: '📋'; }
.icon-mijloacefixe::before { content: '🏭'; }
.icon-salarii::before { content: '💰'; }
.icon-rapoarte::before { content: '📈'; }
.icon-declaratii::before { content: '📝'; }
.icon-setari::before { content: '⚙️'; }
.icon-user::before { content: '👤'; }
.icon-save::before { content: '💾'; }
.icon-print::before { content: '🖨️'; }
.icon-export::before { content: '📤'; }
.icon-import::before { content: '📥'; }
.icon-add::before { content: '➕'; }
.icon-edit::before { content: '✏️'; }
.icon-delete::before { content: '🗑️'; }
.icon-search::before { content: '🔍'; }
.icon-filter::before { content: '🔽'; }
.icon-refresh::before { content: '🔄'; }
.icon-calendar::before { content: '📅'; }
.icon-money::before { content: '💵'; }
.icon-bank::before { content: '🏦'; }
.icon-cash::before { content: '💳'; }
.icon-chart::before { content: '📉'; }
.icon-calculator::before { content: '🧮'; }
.icon-help::before { content: '❓'; }
.icon-info::before { content: 'ℹ️'; }
.icon-warning::before { content: '⚠️'; }
.icon-error::before { content: '❌'; }
.icon-success::before { content: '✅'; }

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 1024px) {
    .ec-nav {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .ec-nav {
        position: fixed;
        left: -200px;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s;
    }

    .ec-nav.open {
        left: 0;
    }

    .ec-form-row {
        flex-direction: column;
    }

    .ec-balanta-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-mf-info-grid {
        grid-template-columns: 1fr;
    }
}
