/**
 * Expert Contab ERP - Modern Professional Theme
 * Design contemporan pentru cabinet contabil profesional
 */

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

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    font-size: 13px;
    color: #1a1a2e;
    background: #f0f4f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   MODERN COLOR PALETTE
   ============================================================ */
:root {
    /* Primary Brand Colors */
    --ec-primary: #2563eb;
    --ec-primary-dark: #1d4ed8;
    --ec-primary-light: #3b82f6;
    --ec-primary-50: #eff6ff;
    --ec-primary-100: #dbeafe;

    /* Neutral Colors */
    --ec-gray-50: #f8fafc;
    --ec-gray-100: #f1f5f9;
    --ec-gray-200: #e2e8f0;
    --ec-gray-300: #cbd5e1;
    --ec-gray-400: #94a3b8;
    --ec-gray-500: #64748b;
    --ec-gray-600: #475569;
    --ec-gray-700: #334155;
    --ec-gray-800: #1e293b;
    --ec-gray-900: #0f172a;

    /* Accent Colors */
    --ec-accent: #0ea5e9;
    --ec-accent-light: #38bdf8;

    /* Borders */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;

    /* Text */
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;

    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-panel: #f8fafc;
    --bg-ribbon: #ffffff;
    --bg-statusbar: #1e293b;

    /* Status colors */
    --success: #22c55e;
    --success-bg: #f0fdf4;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.ec-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Title Bar (File tab area) */
.ec-titlebar {
    background: linear-gradient(to bottom, #4b7cb8 0%, #2b5797 100%);
    color: white;
    padding: 0;
    display: flex;
    align-items: center;
    height: 26px;
    border-bottom: 1px solid #1e395b;
}

.ec-titlebar .app-icon {
    width: 16px;
    height: 16px;
    margin: 0 8px;
}

.ec-titlebar .app-title {
    font-size: 11px;
    flex: 1;
}

.ec-titlebar .window-controls {
    display: flex;
}

.ec-titlebar .window-controls button {
    background: transparent;
    border: none;
    color: white;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 10px;
}

.ec-titlebar .window-controls button:hover {
    background: rgba(255,255,255,0.2);
}

/* ============================================================
   MODERN COMPACT RIBBON INTERFACE
   ============================================================ */
.ec-ribbon {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-bottom: 1px solid var(--border-light);
    user-select: none;
    box-shadow: 0 2px 8px -2px rgba(0,0,0,0.08);
}

/* Ribbon Tabs - Compact & Elegant */
.ec-ribbon-tabs {
    display: flex;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 0 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 1px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ec-ribbon-tabs::-webkit-scrollbar {
    display: none;
}

.ec-ribbon-tab {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-medium);
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    text-decoration: none;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
    white-space: nowrap;
    position: relative;
}

.ec-ribbon-tab:hover {
    color: var(--ec-primary);
    background: rgba(37, 99, 235, 0.04);
}

.ec-ribbon-tab.active {
    color: var(--ec-primary);
    border-bottom-color: var(--ec-primary);
    background: white;
    font-weight: 600;
}

/* File Tab (special blue tab) */
.ec-ribbon-tab.file-tab {
    background: var(--ec-primary);
    color: white;
    border-radius: 5px;
    margin: 5px 8px 5px 0;
    padding: 5px 12px;
    font-weight: 600;
    border-bottom: none;
}

.ec-ribbon-tab.file-tab:hover {
    background: var(--ec-primary-dark);
}

/* Ribbon Content - Compact */
.ec-ribbon-content {
    background: white;
    padding: 6px 12px;
    display: flex;
    min-height: 72px;
}

.ec-ribbon-panel {
    display: none;
    width: 100%;
}

.ec-ribbon-panel.active {
    display: flex;
    animation: fadeSlide 0.15s ease-out;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-2px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ribbon Groups - Compact */
.ec-ribbon-group {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    border-right: 1px solid var(--ec-gray-200);
    margin-right: 4px;
}

.ec-ribbon-group:last-child {
    border-right: none;
    margin-right: 0;
}

.ec-ribbon-group-content {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 2px;
    padding-bottom: 4px;
}

.ec-ribbon-group-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--ec-gray-400);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 4px;
    border-top: 1px solid var(--ec-gray-100);
}

/* Ribbon Buttons - Compact & Clean */
.ec-ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    min-width: 44px;
    text-decoration: none;
    color: inherit;
    transition: all 0.12s ease;
}

.ec-ribbon-btn:hover {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: var(--ec-gray-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ec-ribbon-btn:active {
    background: var(--ec-gray-100);
    transform: scale(0.97);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.ec-ribbon-btn.active {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--ec-primary-100);
}

.ec-ribbon-btn.active .ec-ribbon-btn-icon {
    color: var(--ec-primary);
}

.ec-ribbon-btn-large {
    padding: 8px 10px;
    min-width: 52px;
}

.ec-ribbon-btn-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    color: var(--ec-gray-500);
    transition: all 0.12s ease;
}

.ec-ribbon-btn:hover .ec-ribbon-btn-icon {
    color: var(--ec-primary);
    transform: scale(1.05);
}

.ec-ribbon-btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.ec-ribbon-btn-large .ec-ribbon-btn-icon {
    width: 24px;
    height: 24px;
}

.ec-ribbon-btn-large .ec-ribbon-btn-icon svg {
    width: 22px;
    height: 22px;
}

.ec-ribbon-btn-icon img {
    width: 18px;
    height: 18px;
}

.ec-ribbon-btn-text {
    font-size: 9px;
    font-weight: 500;
    text-align: center;
    color: var(--ec-gray-600);
    line-height: 1.2;
    transition: color 0.12s ease;
    max-width: 60px;
}

.ec-ribbon-btn:hover .ec-ribbon-btn-text {
    color: var(--ec-primary-dark);
}

/* Small ribbon buttons */
.ec-ribbon-btn-sm {
    flex-direction: row;
    min-width: auto;
    padding: 4px 8px;
}

.ec-ribbon-btn-sm .ec-ribbon-btn-icon {
    width: 16px;
    height: 16px;
    margin-bottom: 0;
    margin-right: 5px;
}

.ec-ribbon-btn-sm .ec-ribbon-btn-icon svg {
    width: 14px;
    height: 14px;
}

.ec-ribbon-btn-sm .ec-ribbon-btn-text {
    font-size: 10px;
}

/* ============================================================
   QUICK ACCESS TOOLBAR
   ============================================================ */
.ec-quick-access {
    display: flex;
    align-items: center;
    padding: 0 5px;
    background: linear-gradient(to bottom, #4b7cb8 0%, #2b5797 100%);
    height: 20px;
}

.ec-quick-access button {
    background: transparent;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 2px;
    color: white;
    font-size: 11px;
}

.ec-quick-access button:hover {
    background: rgba(255,255,255,0.2);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.ec-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--ec-gray-50);
}

/* Full-width content (no left nav) */
.ec-main.ec-main-full {
    flex-direction: column;
}

.ec-main-full .ec-content {
    flex: 1;
    padding: 24px 32px;
}

/* Navigation Panel (Left Sidebar) */
.ec-nav {
    width: 240px;
    background: white;
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.ec-nav-section {
    margin-bottom: 8px;
}

.ec-nav-section-header {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ec-nav-section-header:hover {
    color: var(--ec-primary);
}

.ec-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px 10px 20px;
    font-size: 13px;
    color: var(--text-medium);
    text-decoration: none;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
}

.ec-nav-item:hover {
    background: var(--ec-gray-50);
    color: var(--ec-primary);
    border-left-color: var(--ec-primary-100);
}

.ec-nav-item.active {
    background: var(--ec-primary-50);
    color: var(--ec-primary);
    border-left-color: var(--ec-primary);
    font-weight: 500;
}

.ec-nav-item .nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    color: inherit;
}

/* Content Area */
.ec-content {
    flex: 1;
    background: var(--ec-gray-50);
    overflow: auto;
    padding: 20px;
}

/* Page Header */
.ec-page-header {
    margin-bottom: 24px;
}

.ec-page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.ec-page-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* ============================================================
   MODERN PANELS & CARDS
   ============================================================ */
.ec-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.ec-panel:hover {
    box-shadow: var(--shadow-md);
}

.ec-panel-header {
    background: var(--ec-gray-50);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ec-panel-header .panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--ec-primary-50);
    border-radius: 8px;
    margin-right: 12px;
    color: var(--ec-primary);
}

.ec-panel-body {
    padding: 20px;
}

.ec-panel-footer {
    background: var(--ec-gray-50);
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

/* ============================================================
   MODERN FORMS
   ============================================================ */
.ec-form-group {
    margin-bottom: 16px;
}

.ec-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.ec-form-group label.required::after {
    content: ' *';
    color: var(--danger);
}

.ec-form-control,
.ec-input,
.ec-select,
.ec-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.ec-input:hover,
.ec-select:hover,
.ec-textarea:hover {
    border-color: var(--border-dark);
}

.ec-input:focus,
.ec-select:focus,
.ec-textarea:focus {
    outline: none;
    border-color: var(--ec-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ec-input:disabled,
.ec-select:disabled,
.ec-textarea:disabled {
    background: var(--ec-gray-100);
    color: var(--text-light);
    cursor: not-allowed;
    border-color: var(--border-light);
}

.ec-input.error,
.ec-select.error,
.ec-textarea.error {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.ec-input.error:focus,
.ec-select.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ec-form-row {
    display: flex;
    gap: 16px;
}

.ec-form-row .ec-form-group {
    flex: 1;
}

.ec-form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ec-form-inline label {
    margin-bottom: 0;
    white-space: nowrap;
}

.ec-form-inline .ec-input,
.ec-form-inline .ec-select {
    width: auto;
}

/* Form Help Text */
.ec-form-help {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Checkbox & Radio - Modern */
.ec-checkbox,
.ec-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    margin-right: 16px;
    gap: 8px;
}

.ec-checkbox input,
.ec-radio input {
    width: 18px;
    height: 18px;
    accent-color: var(--ec-primary);
    cursor: pointer;
}

/* Input with Icon */
.ec-input-group {
    position: relative;
}

.ec-input-group .ec-input {
    padding-left: 40px;
}

.ec-input-group-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Search Input */
.ec-search-input {
    position: relative;
}

.ec-search-input input {
    padding-left: 36px;
    border-radius: 20px;
}

.ec-search-input svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

/* ============================================================
   MODERN BUTTONS
   ============================================================ */
.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.ec-btn:hover {
    background: var(--ec-gray-50);
    border-color: var(--border-dark);
    box-shadow: var(--shadow);
}

.ec-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.ec-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.ec-btn-primary {
    background: var(--ec-primary);
    border-color: var(--ec-primary-dark);
    color: white;
}

.ec-btn-primary:hover {
    background: var(--ec-primary-dark);
    border-color: var(--ec-primary-dark);
}

.ec-btn-success {
    background: var(--success);
    border-color: #16a34a;
    color: white;
}

.ec-btn-success:hover {
    background: #16a34a;
}

.ec-btn-danger {
    background: var(--danger);
    border-color: #dc2626;
    color: white;
}

.ec-btn-danger:hover {
    background: #dc2626;
}

.ec-btn-warning {
    background: var(--warning);
    border-color: #d97706;
    color: white;
}

.ec-btn-warning:hover {
    background: #d97706;
}

.ec-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 5px;
}

.ec-btn-lg {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 8px;
}

.ec-btn-icon {
    margin-right: 8px;
}

/* Button Group */
.ec-btn-group {
    display: inline-flex;
}

.ec-btn-group .ec-btn {
    border-radius: 0;
    margin-left: -1px;
}

.ec-btn-group .ec-btn:first-child {
    border-radius: 6px 0 0 6px;
    margin-left: 0;
}

.ec-btn-group .ec-btn:last-child {
    border-radius: 0 6px 6px 0;
}

/* ============================================================
   MODERN TABLES
   ============================================================ */
.ec-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: white;
}

.ec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ec-table th {
    background: var(--ec-gray-50);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.ec-table th.sortable {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ec-table th.sortable:hover {
    background: var(--ec-gray-100);
    color: var(--ec-primary);
}

.ec-table th.sorted-asc::after {
    content: ' ↑';
    color: var(--ec-primary);
}

.ec-table th.sorted-desc::after {
    content: ' ↓';
    color: var(--ec-primary);
}

.ec-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--ec-gray-100);
    color: var(--text-dark);
    vertical-align: middle;
}

.ec-table tbody tr {
    transition: all var(--transition-fast);
}

.ec-table tbody tr:hover {
    background: var(--ec-gray-50);
}

.ec-table tbody tr:hover td {
    color: var(--text-dark);
}

.ec-table tr.selected td {
    background: var(--ec-primary-50);
}

.ec-table tbody tr:last-child td {
    border-bottom: none;
}

.ec-table .text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ec-table .text-center {
    text-align: center;
}

.ec-table .col-actions {
    white-space: nowrap;
    text-align: right;
}

.ec-table .col-actions .ec-btn {
    margin-left: 4px;
}

/* Table Row Status Indicators */
.ec-table tr.row-success td:first-child {
    border-left: 3px solid var(--success);
}

.ec-table tr.row-warning td:first-child {
    border-left: 3px solid var(--warning);
}

.ec-table tr.row-danger td:first-child {
    border-left: 3px solid var(--danger);
}

/* ============================================================
   TABS
   ============================================================ */
.ec-tabs {
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    background: #fff;
}

.ec-tabs-nav {
    display: flex;
    background: linear-gradient(to bottom, #f5f9fc 0%, #e8f1f9 100%);
    border-bottom: 1px solid #a4c8e8;
    padding: 0 5px;
}

.ec-tab-btn {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: bold;
    color: var(--text-dark);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
}

.ec-tab-btn:hover {
    background: rgba(255,255,255,0.5);
}

.ec-tab-btn.active {
    background: #fff;
    border-bottom-color: #f8b518;
}

.ec-tab-content {
    padding: 15px;
}

.ec-tab-pane {
    display: none;
}

.ec-tab-pane.active {
    display: block;
}

/* ============================================================
   MODERN ALERTS & MESSAGES
   ============================================================ */
.ec-alert {
    padding: 14px 18px;
    border: 1px solid;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ec-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.ec-alert-content {
    flex: 1;
}

.ec-alert-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.ec-alert-success {
    background: var(--success-bg);
    border-color: #86efac;
    color: #166534;
}

.ec-alert-info {
    background: var(--info-bg);
    border-color: #93c5fd;
    color: #1e40af;
}

.ec-alert-warning {
    background: var(--warning-bg);
    border-color: #fcd34d;
    color: #92400e;
}

.ec-alert-danger {
    background: var(--danger-bg);
    border-color: #fca5a5;
    color: #991b1b;
}

/* ============================================================
   MODAL / DIALOG
   ============================================================ */
.ec-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 57, 91, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ec-modal {
    background: #fff;
    border: 1px solid #5c8dc0;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.ec-modal-title {
    font-size: 13px;
    font-weight: bold;
}

.ec-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
}

.ec-modal-close:hover {
    opacity: 0.8;
}

.ec-modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.ec-modal-footer {
    padding: 10px 15px;
    background: #f5f9fc;
    border-top: 1px solid #d4e3f5;
    text-align: right;
    border-radius: 0 0 4px 4px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ec-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
}

.ec-pagination a,
.ec-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    background: linear-gradient(to bottom, #f5f9fc 0%, #e8f1f9 100%);
    color: var(--text-dark);
    text-decoration: none;
}

.ec-pagination a:hover {
    background: linear-gradient(to bottom, #fefefe 0%, #f0f6fb 100%);
    border-color: #6a9fd2;
}

.ec-pagination .active {
    background: linear-gradient(to bottom, #fce38e 0%, #fbc63d 100%);
    border-color: #c29b18;
    font-weight: bold;
}

.ec-pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   MODERN STATUS BAR
   ============================================================ */
.ec-statusbar {
    background: var(--ec-gray-900);
    color: var(--ec-gray-300);
    padding: 8px 20px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ec-statusbar-left,
.ec-statusbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ec-statusbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ec-statusbar-item strong {
    color: var(--ec-gray-400);
    font-weight: 500;
}

.ec-statusbar-link {
    color: var(--ec-accent-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.ec-statusbar-link:hover {
    color: white;
}

.ec-statusbar-link.text-warning {
    color: var(--warning);
}

.ec-statusbar-select {
    background: var(--ec-gray-800);
    border: 1px solid var(--ec-gray-700);
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ec-statusbar-select:hover {
    background: var(--ec-gray-700);
    border-color: var(--ec-gray-600);
}

.ec-statusbar-select:focus {
    outline: none;
    border-color: var(--ec-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.ec-statusbar-select option {
    background: var(--ec-gray-800);
    color: white;
}

/* ============================================================
   BREADCRUMB (Ascunse conform cerintelor)
   ============================================================ */
.ec-breadcrumb {
    display: none;
}

.ec-breadcrumb a {
    color: var(--office-blue);
    text-decoration: none;
}

.ec-breadcrumb a:hover {
    text-decoration: underline;
}

.ec-breadcrumb span {
    color: var(--text-light);
    margin: 0 8px;
}

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.ec-dropdown {
    position: relative;
    display: inline-block;
}

.ec-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #a4c8e8;
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    z-index: 100;
    display: none;
}

.ec-dropdown.open .ec-dropdown-menu {
    display: block;
}

.ec-dropdown-item {
    display: block;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-dark);
    text-decoration: none;
    cursor: pointer;
}

.ec-dropdown-item:hover {
    background: #f0f6fb;
}

.ec-dropdown-divider {
    height: 1px;
    background: #d4e3f5;
    margin: 5px 0;
}

/* ============================================================
   TREE VIEW (for plan conturi, etc)
   ============================================================ */
.ec-tree {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 11px;
}

.ec-tree ul {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.ec-tree-item {
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ec-tree-item:hover {
    background: #f0f6fb;
}

.ec-tree-toggle {
    width: 16px;
    height: 16px;
    text-align: center;
    margin-right: 4px;
    cursor: pointer;
}

.ec-tree-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.ec-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ec-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #d4e3f5;
    border-top-color: #2b5797;
    border-radius: 50%;
    animation: ec-spin 0.8s linear infinite;
}

@keyframes ec-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-light); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 20px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }

.p-0 { padding: 0; }
.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }

.hidden { display: none; }
.visible { display: block; }

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.ec-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.ec-col {
    padding: 0 10px;
    flex: 1;
}

.ec-col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.ec-col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.ec-col-3 { flex: 0 0 25%; max-width: 25%; }
.ec-col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.ec-col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.ec-col-6 { flex: 0 0 50%; max-width: 50%; }
.ec-col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.ec-col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.ec-col-9 { flex: 0 0 75%; max-width: 75%; }
.ec-col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.ec-col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.ec-col-12 { flex: 0 0 100%; max-width: 100%; }

/* ============================================================
   TOOLBAR
   ============================================================ */
.ec-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.ec-toolbar-left,
.ec-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ec-toolbar-right {
    color: var(--text-light);
    font-size: 13px;
}

/* ============================================================
   DASHBOARD WIDGETS
   ============================================================ */
.ec-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ec-dashboard-widget {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.ec-dashboard-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ec-dashboard-widget-header {
    padding: 12px 16px;
    background: var(--ec-gray-50);
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
}

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

.ec-stat-card {
    text-align: center;
}

.ec-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.ec-stat-value.text-warning {
    color: var(--warning);
}

.ec-stat-value.text-success {
    color: var(--success);
}

.ec-stat-value.text-info {
    color: var(--info);
}

.ec-stat-value.text-danger {
    color: var(--danger);
}

.ec-stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.ec-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    background: var(--ec-gray-100);
    color: var(--text-medium);
}

.ec-badge-primary {
    background: var(--ec-primary-50);
    color: var(--ec-primary);
}

.ec-badge-success {
    background: var(--success-bg);
    color: #166534;
}

.ec-badge-warning {
    background: var(--warning-bg);
    color: #92400e;
}

.ec-badge-danger {
    background: var(--danger-bg);
    color: #991b1b;
}

.ec-badge-info {
    background: var(--info-bg);
    color: #1e40af;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .ec-ribbon,
    .ec-nav,
    .ec-statusbar,
    .ec-titlebar,
    .ec-toolbar,
    .no-print {
        display: none !important;
    }

    .ec-content {
        padding: 0;
        background: white;
    }

    .ec-panel {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .ec-table {
        font-size: 10px;
    }
}
