/* =========================
   ADMIN DASHBOARD STYLES
========================= */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px 16px;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 32px;
}

.sidebar-brand .logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sidebar-brand h4 {
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 12px;
    margin-bottom: 12px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.sidebar a i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar a:hover {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    transform: translateX(4px);
}

.sidebar a.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sidebar-footer {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 16px;
}

.sidebar-footer a {
    color: #ef4444 !important;
}

.sidebar-footer a:hover {
    background: rgba(239, 68, 68, 0.2) !important;
}

.sidebar {
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar-brand {
    position: relative;
}

.sidebar-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.sidebar-collapsed .sidebar {
    width: 80px;
    padding: 24px 10px;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-brand h4,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .sidebar a span,
body.sidebar-collapsed .sidebar-footer a span {
    display: none !important;
}

body.sidebar-collapsed .sidebar a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .sidebar a:hover {
    transform: none;
}

body.sidebar-collapsed .sidebar-footer {
    left: 0;
    right: 0;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .main-content {
    margin-left: 80px;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

/* HEADER */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    color: white;
    font-weight: 700;
    font-size: 1.8rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-header .date-badge {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* STATS ROW */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.stat-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 16px;
}

.stat-card .icon-box.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-card .icon-box.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card .icon-box.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card .icon-box.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-card p {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.stat-card .trend {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-card .trend.up { background: #d1fae5; color: #059669; }
.stat-card .trend.down { background: #fee2e2; color: #dc2626; }

/* DASHBOARD CARDS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 24px;
    padding: 28px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* EQUIPMENT PAGE */
.equipment-item {
    display: flex;
}

.equipment-card {
    width: 100%;
    border: none;
    border-radius: 26px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.equipment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
}

.equipment-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.equipment-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
}

.equipment-card .card-title {
    font-weight: 700;
    margin-bottom: 0;
}

.equipment-card .card-body p {
    margin-bottom: 0.55rem;
    color: #475569;
}

.status-badge {
    font-size: 0.8rem;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.status-available {
    background: #d1e7dd;
    color: #166534;
}

.status-low {
    background: #fff3cd;
    color: #854d0e;
}

.status-unavailable {
    background: #f8d7da;
    color: #842029;
}

.btn-details {
    margin-top: auto;
    border-radius: 14px;
    padding: 12px 16px;
}

.btn-details:hover {
    transform: translateY(-1px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-box {
    width: 340px;
    max-width: 100%;
}

.search-box .form-control {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
    border-right: 0;
    box-shadow: none;
}

.search-box .input-group-text {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
    border-right: 0;
    background: #ffffff;
    color: #0d6efd;
}

@media (max-width: 991px) {
    .search-box {
        width: 100%;
    }
}

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header-custom h5 {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.card-header-custom h5 i {
    font-size: 1.3rem;
}

.card-header-custom .badge-count {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* BOOKING ITEM */
.booking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.booking-item:hover {
    background: white;
    border-color: var(--primary);
    transform: scale(1.02);
}

.booking-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.booking-info {
    flex: 1;
}

.booking-info h6 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.booking-info small {
    color: #64748b;
    font-size: 0.8rem;
}

.btn-view {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-view:hover {
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* PENALTY CARD */
.penalty-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.penalty-item.total {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid var(--danger);
}

.penalty-item.monthly {
    background: linear-gradient(135deg, #fefce8, #fef3c7);
    border-left: 4px solid var(--warning);
}

.penalty-item.status {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-left: 4px solid var(--success);
}

.penalty-item h6 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.penalty-item small {
    color: #64748b;
    font-size: 0.75rem;
}

.penalty-amount {
    font-size: 1.4rem;
    font-weight: 700;
}

.penalty-amount.danger { color: var(--danger); }
.penalty-amount.warning { color: var(--warning); }
.penalty-amount.success { color: var(--success); }

/* INSIGHT CARD */
.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255,255,255,0.5);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.insight-item:hover {
    background: white;
    transform: translateX(5px);
}

.insight-item .label {
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.insight-item .value {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
}

/* QUICK ACTIONS */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.quick-action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.quick-action-btn.secondary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.quick-action-btn.secondary:hover {
    background: var(--primary);
}

.dashboard-link {
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(255,255,255,0.92);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-link:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 30px rgba(15,23,42,0.08);
}

.status-badge {
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 999px;
}

.sidebar .sidebar-footer {
    position: static;
    margin-top: 32px;
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        padding: 16px 8px;
    }
    .sidebar-brand h4,
    .sidebar a span,
    .nav-section-title {
        display: none;
    }
    .sidebar a {
        justify-content: center;
        padding: 14px;
    }
    .main-content {
        margin-left: 80px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* PROGRESS BARS */
.progress-item {
    margin-bottom: 20px;
}

.progress-item label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.85rem;
}

.progress {
    height: 10px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 1s ease;
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .card {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* RESPONSIVE */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        padding: 16px 8px;
    }
    .sidebar-brand h4,
    .sidebar a span,
    .nav-section-title {
        display: none;
    }
    .sidebar a {
        justify-content: center;
        padding: 14px;
    }
    .main-content {
        margin-left: 80px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* EQUIPMENT IMAGE (RECTANGLE + COVER) */
.table .equipment-img {
                 /* rectangle height */
    object-fit:  cover;          /* fill without distortion */
    object-position: center;    /* center crop */
    display: block;

    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* HOVER EFFECT */
.table .equipment-img:hover {
    transform: scale(1.05);     /* smooth zoom */
    border-color: var(--primary);
}
