/* custom.css - Versiune complet nouă fără modificări dropdown */

/* ===================================
   SKIP LINK (ACCESIBILITATE)
   =================================== */

.skip-link {
    position: absolute;
    top: -3rem;
    left: 0.5rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0.5rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===================================
   LAYOUT PRINCIPAL
   =================================== */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.page-container {
    padding: 2rem 1rem;
    max-width: 100%;
    margin: 0 auto;
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
}

/* ===================================
   CARD-URI
   =================================== */

.card-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ===================================
   HEADER-URI PAGINĂ
   =================================== */

.page-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2e4963;
    margin: 0;
    text-shadow: none;
}

.page-header .page-subtitle {
    margin: 0.15rem 0 0 0;
    opacity: 0.9;
    font-size: 0.85rem;
}

/* Dimensiune icon din header (override pentru stilul inline) */
.page-header i.bi {
    font-size: 1.1rem !important;
    opacity: 0.9;
}

/* ===================================
   CARD-URI DE CONȚINUT
   =================================== */

.content-card {
    background: white;
    border-radius: 1.5rem;
    border: 1.5px solid #e0e7ef;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    word-wrap: break-word;
}

/* ===================================
   TABELE
   =================================== */

.standard-table {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
}

.standard-table .table {
    margin: 0;
    width: 100%;
    table-layout: auto;
}

.standard-table .table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 100px;
}

.standard-table .table tbody td {
    padding: 0.75rem;
    border: none;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
    word-wrap: break-word;
    max-width: 200px;
    text-overflow: ellipsis;
}

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

.standard-table .table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-list-clickable thead th.sortable a:hover,
.table-list-clickable thead th.sortable-header a:hover {
    text-decoration: underline;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1200px) {
    .content-card {
        padding: 1.5rem;
    }
    
    .standard-table .table thead th,
    .standard-table .table tbody td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 1rem 0.5rem;
    }
    
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .dashboard-icon { font-size: 1.4rem; }
    .welcome { font-size: 1.2rem; }
    .stat-value { font-size: 1.5rem; }
    .card-glass { border-radius: 1rem; }
    .page-header h1 { font-size: 1.8rem; }
    .content-card { 
        padding: 1rem;
        border-radius: 1rem;
    }
    .standard-form { padding: 1rem; }
    
    .standard-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .standard-table .table {
        min-width: 600px;
    }
    
    .standard-table .table thead th,
    .standard-table .table tbody td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    /* Navbar - optimizări mobile */
    .navbar .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }

    .navbar .dropdown-menu {
        width: 100%;
    }

    .navbar .dropdown-item,
    .navbar .dropdown-header {
        white-space: normal;
    }

    .btn-group,
    .btn-toolbar {
        flex-wrap: wrap;
    }

    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-container {
        padding: 0.75rem 0.5rem;
    }

    .standard-form {
        padding: 0.75rem;
    }

    .standard-form .form-control,
    .standard-form .form-select {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    .btn-standard {
        width: 100%;
    }

    .d-flex.gap-3,
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    
    .content-card {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }
    
    .standard-table .table thead th,
    .standard-table .table tbody td {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
}

/* ===================================
   BUTOANE
   =================================== */

.btn-standard {
    border-radius: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    cursor: pointer;
}

.btn-standard:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-standard.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
}

.btn-standard.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-color: #28a745;
}

.btn-standard.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
    border-color: #17a2b8;
}

.btn-standard.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border-color: #ffc107;
}

.btn-standard.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-color: #dc3545;
}

/* ===================================
   FORMULARE
   =================================== */

.standard-form {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1.5px solid #e0e7ef;
}

.standard-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.standard-form .form-control,
.standard-form .form-select {
    border-radius: 0.75rem;
    border: 1.5px solid #e0e7ef;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.standard-form .form-control:focus,
.standard-form .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* ===================================
   ACCESIBILITATE (a11y) – FOCUS VIZIBIL
   =================================== */

/* Focus vizibil pentru navigare cu tastatura (:focus-visible);
   nu schimbă aspectul la click (mouse). */
a:focus-visible,
button:focus-visible,
[type="submit"]:focus-visible,
[type="button"]:focus-visible,
[type="checkbox"]:focus-visible,
[type="radio"]:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.form-control:focus-visible,
.form-select:focus-visible {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.35);
    outline: 2px solid #0d6efd;
    outline-offset: 0;
}

/* Butoane și linkuri din tabele / carduri */
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.page-link:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* ===================================
   ALERTE
   =================================== */

.alert-standard {
    border-radius: 1rem;
    border: 1.5px solid transparent;
    padding: 1rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.alert-standard.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #c3e6cb;
    color: #155724;
}

.alert-standard.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-standard.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffeaa7;
    color: #856404;
}

.alert-standard.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #bee5eb;
    color: #0c5460;
}

/* ===================================
   BADGE-URI
   =================================== */

.badge-standard {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===================================
   CARD-URI STATISTICI
   =================================== */

.stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1.5px solid #e0e7ef;
    transition: all 0.3s ease;
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stats-card .stats-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stats-card .stats-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3366bb;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stats-card .stats-label {
    font-size: 1rem;
    color: #6d8191;
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   DASHBOARD SPECIFIC
   =================================== */

.dashboard-icon { font-size: 2.2rem; margin-bottom: 8px; }
.text-blue { color: #3366bb !important; }
.text-cyan { color: #16b2d6 !important; }
.text-sky { color: #4fa3e3 !important; }
.text-navy { color: #1e3357 !important; }
.welcome { font-size: 1.7rem; font-weight: 600; color: #2e4963; margin: 25px 0 30px 0; letter-spacing: -.5px; }
.stat-value { font-size: 2.3rem; font-weight: 800; color: #3366bb; }
.stat-label { font-size: 1.02rem; color: #6d8191; font-weight: 500; margin-top: 0.4rem; }

/* ===================================
   FULLCALENDAR CUSTOMIZAT
   =================================== */

.fc-event.event-custom,
.fc-event.event-custom .fc-event-title,
.fc-event.event-custom .fc-event-main {
    color: #1a2436 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(180,180,180,0.09);
    margin: 1px 0 !important;
    background-image: none !important;
    list-style-type: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-event.event-custom:before,
.fc-daygrid-event-dot,
.fc-list-event-dot {
    display: none !important;
    content: "" !important;
}

.fc-daygrid-event-harness, .fc-event-main-frame {
    list-style: none !important;
    padding-left: 0 !important;
    counter-increment: none !important;
}

.fc-daygrid-event-harness::marker { display: none !important; }

.fc .fc-event.event-custom .fc-event-title,
.fc .fc-event.event-custom .fc-event-main {
    color: inherit !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================================
   CARD-URI GENERALE
   =================================== */

.card,
.login-card {
    box-shadow: none !important;
    background: #fff !important;
    border: 1.5px solid #e0e7ef !important;
    transition: none !important;
}

.card:hover,
.login-card:hover {
    box-shadow: none !important;
    background: #fff !important;
    border-color: #e0e7ef !important;
    transform: none !important;
    cursor: default !important;
}

/* ===================================
   RESPONSIVE COMPLET – TABELE ȘI FORMULARE PE MOBIL
   =================================== */

@media (max-width: 768px) {
    /* Tabel: scroll orizontal cu indiciu vizual */
    .table-responsive,
    .standard-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    .standard-table .table {
        min-width: 600px;
    }
    .standard-table .table thead th {
        white-space: nowrap;
    }
    /* Formulare: câmpuri full-width, touch targets mărite */
    .standard-form .row [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .standard-form .form-control,
    .standard-form .form-select,
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* reduce zoom pe iOS */
    }
    .standard-form .btn,
    .btn-standard {
        min-height: 44px;
        padding: 0.6rem 1rem;
    }
    /* Grupuri de butoane pe mobil */
    .btn-group .btn {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    .standard-table .table {
        min-width: 500px;
    }
    .standard-table .table thead th,
    .standard-table .table tbody td {
        padding: 0.4rem 0.35rem;
        font-size: 0.8rem;
    }
    /* Modal și dropdown pe ecran mic */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
}

/* ===================================
   LOADING STATES PENTRU ACȚIUNI AJAX
   =================================== */

.ajax-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.ajax-placeholder {
    color: #6c757d;
    font-style: italic;
}

.ajax-placeholder.loading::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.35rem;
    border: 2px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: crm-spin 0.7s linear infinite;
    vertical-align: middle;
}

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