/* ==========================================
   RegesManager - Stiluri principale
   ========================================== */

:root {
    --sidebar-width: 240px;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
}

/* Layout */
#wrapper {
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #1e293b !important;
    transition: width 0.2s ease;
    flex-shrink: 0;
}

#sidebar.collapsed {
    width: 60px;
}

#sidebar.collapsed .nav-link span,
#sidebar.collapsed .fs-5,
#sidebar.collapsed .dropdown span {
    display: none;
}

#sidebar .nav-link {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: background 0.15s;
}

#sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link.active {
    background: var(--primary) !important;
}

#page-content-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Tables */
.table-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-card .table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table tbody tr {
    transition: background 0.1s;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Badges */
.badge-status {
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Forms */
.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.form-section-title:first-of-type {
    margin-top: 0;
}

/* Search bar */
.search-bar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

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

/* Action buttons in tables */
.btn-action {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Tom Select overrides */
.ts-wrapper .ts-control {
    border-radius: 6px;
    border-color: #dee2e6;
}

.ts-wrapper.focus .ts-control {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    font-size: 0.875rem;
}

/* Contract state colors */
.state-activ { background: #dcfce7; color: #166534; }
.state-suspendat { background: #fef3c7; color: #92400e; }
.state-incetat { background: #fee2e2; color: #991b1b; }
.state-detasare { background: #dbeafe; color: #1e40af; }
.state-mutare { background: #f3e8ff; color: #6b21a8; }

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        width: 60px;
    }

    #sidebar .nav-link span,
    #sidebar .fs-5,
    #sidebar .dropdown span {
        display: none;
    }
}
