:root {
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
    --sidebar-bg: #2c3e50;
    --sidebar-hover: #34495e;
    --text-light: #ecf0f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #1a252f 100%);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section-title {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 10px 20px;
    margin-top: 10px;
    letter-spacing: 1px;
}

.nav-item {
    margin: 5px 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 8px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease-in-out;
}

/* Top Navbar */
.top-navbar {
    position: sticky;
    top: 0;
    background: white;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 999;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    position: relative;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--dark-color);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.notification-btn:hover {
    background: var(--light-bg);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Main Content */
.main-content {
    padding: 30px;
    min-height: calc(100vh - var(--navbar-height));
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .top-navbar {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .sidebar-footer {
        position: relative;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   CARD STYLES
   ============================================ */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: none;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    color: white;
    padding: 20px;
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

/* Dashboard Cards */
.stats-card {
    border-radius: 12px;
    padding: 20px;
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stats-card h5 {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: bold;
}

/* ============================================
   TABLE RESPONSIVE
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-bg);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: white;
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--dark-color);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-dismissible .btn-close {
    padding: 18px 20px;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ============================================
   RESPONSIVE GRID
   ============================================ */
@media (max-width: 576px) {
    .row > * {
        margin-bottom: 15px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm-custom {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Existing styles remain unchanged */

/* Locked Task Styles */
.form-select:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.alert-danger {
    border-left: 4px solid #dc3545;
}

.card.border-danger {
    border-left: 4px solid #dc3545 !important;
}

.card.border-warning {
    border-left: 4px solid #ffc107 !important;
}

/* Lock icon animation */
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.bi-lock-fill {
    animation: shake 0.5s ease-in-out;
}

/* Disabled form styling */
select:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
}

button:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Warning and danger text colors */
.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

/* Badge styling for locked status */
.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* Alert box styling */
.alert {
    border-radius: 8px;
    padding: 15px;
}

.alert h5 {
    margin-bottom: 10px;
    font-weight: 600;
}

.alert p:last-child {
    margin-bottom: 0;
}

/* Card styling for status information */
.card.border-danger .card-header,
.card.border-warning .card-header {
    font-weight: 600;
}

.card-body small.text-muted {
    display: block;
    margin-top: 8px;
    line-height: 1.5;
}

/* Icon spacing */
.bi {
    margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 12px;
        font-size: 0.9rem;
    }

    .alert h5 {
        font-size: 1rem;
    }
}
/* ============================================
   SIMPLE LINK STYLES
   ============================================ */

/* Xóa gạch chân, màu xanh đẹp hơn */
a:not(.btn):not(.nav-link):not(.sidebar-brand) {
    text-decoration: none;
    color: #dc3545;
    transition: color 0.2s ease;
}

a:not(.btn):not(.nav-link):not(.sidebar-brand):hover {
    color: #0a58ca;
}