:root {
    --bluelogo: #1a76d1; 
    --logored: #93010b; 
    --background-color: #f4f6f9;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--background-color);
}

::selection {
    background: var(--logored);
    color: #fff;
}

body.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f4f6f9;
}

.login-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-wrapper img {
    max-width: 120px;
    margin-bottom: 15px;
}

.login-wrapper h2 {
    color: var(--logored);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.form-group input:focus {
    border-color: var(--bluelogo);
    box-shadow: 0 0 5px rgba(11, 94, 215, 0.2);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: var(--bluelogo);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background-color: var(--logored);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--bluelogo);
}


@media screen and (max-width: 480px) {
    .login-wrapper {
        max-width: 90%;
    }
}

/* =========================================================================
   Admin Dashboard Layout Styles
   ========================================================================= */

.admin-wrapper {
    min-height: 100vh;
    background-color: var(--background-color);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #ffffff; /* White background to match the web */
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-right: 1px solid #e5e7eb;
}

.sidebar .sidebar-logo {
    padding: 15px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.sidebar .sidebar-logo .logo-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .sidebar-logo img {
    max-height: 65px;
    width: auto;
    display: block;
}

.sidebar .sidebar-logo h3 {
    font-size: 18px;
    color: var(--logored);
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    display: none; /* Hidden on desktop */
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--logored);
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu ul li {
    margin-bottom: 5px;
}

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #4b5563; /* Dark grey text */
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu ul li a i {
    width: 25px;
    font-size: 18px;
    margin-right: 10px;
    color: #9ca3af; /* Lighter icon color */
    transition: color 0.3s ease;
}

.sidebar-menu ul li a:hover, 
.sidebar-menu ul li.active a {
    background-color: color-mix(in srgb, var(--logored) 8%, transparent);
    color: var(--logored);
    border-left: 4px solid var(--logored);
}

.sidebar-menu ul li a:hover i, 
.sidebar-menu ul li.active a i {
    color: var(--logored);
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Sidebar Toggle States — Hidden */
.admin-wrapper.sidebar-toggled .sidebar {
    transform: translateX(-100%);
}
.admin-wrapper.sidebar-toggled .main-content {
    margin-left: 0;
}

/* Sidebar Collapsed — Narrow (Desktop hover-expand) */
.admin-wrapper.sidebar-collapsed .sidebar {
    width: 60px;
    overflow: hidden;
}
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-logo h3,
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-logo .close-btn,
.admin-wrapper.sidebar-collapsed .sidebar-menu ul li a span {
    display: none;
}
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-logo {
    justify-content: center;
    padding: 16px 0;
}
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-logo .logo-left {
    gap: 0;
}
.admin-wrapper.sidebar-collapsed .sidebar-menu ul li a {
    justify-content: center;
    padding: 14px 0;
}
.admin-wrapper.sidebar-collapsed .sidebar-menu ul li a i {
    margin-right: 0;
    width: auto;
    font-size: 20px;
}
.admin-wrapper.sidebar-collapsed .main-content {
    margin-left: 60px;
}
/* Hover expand on collapsed sidebar */
.admin-wrapper.sidebar-collapsed .sidebar:hover {
    width: 250px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-logo h3,
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-logo .close-btn,
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-menu ul li a span {
    display: inline-block;
}
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-logo {
    justify-content: space-between;
    padding: 15px 16px;
}
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-logo .logo-left {
    gap: 8px;
}
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-menu ul li a {
    justify-content: flex-start;
    padding: 12px 20px;
}
.admin-wrapper.sidebar-collapsed .sidebar:hover .sidebar-menu ul li a i {
    margin-right: 10px;
    width: 25px;
    font-size: 18px;
}

/* Full-screen mode */
.admin-wrapper.is-fullscreen .sidebar {
    z-index: 998;
}
.admin-wrapper.is-fullscreen .main-content {
    margin-left: 0;
}
.admin-wrapper.is-fullscreen.sidebar-collapsed .main-content {
    margin-left: 0;
}
.admin-wrapper.is-fullscreen .top-navbar {
    position: sticky;
    top: 0;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    flex-shrink: 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--logored);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 990;
    position: sticky;
    top: 0;
    width: 100%;
}

.top-navbar .nav-left {
    display: flex;
    align-items: center;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #4b5563;
    margin-right: 15px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.toggle-btn:hover {
    color: var(--logored);
}

.top-navbar .nav-left h2 {
    font-size: 20px;
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.top-navbar .nav-right {
    display: flex;
    align-items: center;
}

.nav-right .admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
}

.nav-right .admin-profile i.fa-user-circle {
    font-size: 28px;
    color: var(--bluelogo);
}

.nav-right .logout-btn {
    margin-left: 20px;
    color: var(--logored);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-right .logout-btn:hover {
    color: #b01a20;
}

/* Page Content */
.page-content {
    padding: 30px;
    flex-grow: 1;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-stat {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.card-stat .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: var(--bluelogo);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-right: 20px;
}

.card-stat .details h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.card-stat .details p {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Mobile Logout Default (Hidden on Desktop) */
.mobile-logout {
    display: none;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    
    .admin-wrapper.sidebar-toggled .sidebar {
        transform: translateX(0);
    }
    .admin-wrapper.sidebar-toggled .main-content {
        margin-left: 0;
    }
    
    .desktop-logout {
        display: none !important;
    }
    .mobile-logout {
        display: block;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid #e5e7eb;
    }
    
    .toggle-btn {
        display: flex; /* Show toggle button on mobile */
    }

    .close-btn {
        display: block; /* Show close button on mobile */
    }
    
    .sidebar {
        box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    }
}

/* Extra tweaks for very small screens (phones) */
@media screen and (max-width: 480px) {
    .top-navbar {
        padding: 0 15px;
    }
    .top-navbar .nav-left h2 {
        font-size: 16px;
    }
    .nav-right .admin-profile span {
        display: none; /* Hide admin text to save space */
    }
}

/* =========================================================================
   Admin UI Components (Tables, Forms, Buttons)
   ========================================================================= */

.admin-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
}

/* Tables */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    color: var(--text-color);
}

.admin-table th {
    background-color: #f9fafb;
    color: #4b5563;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--bluelogo);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #084298;
}

.btn-danger {
    background-color: var(--logored);
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #b01a20;
}

.btn-edit {
    background-color: #f59e0b; /* Orange */
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s;
}

.btn-edit:hover {
    background-color: #d97706;
}

/* Forms */
.admin-form .form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.admin-form .form-group input[type="text"],
.admin-form .form-group input[type="date"],
.admin-form .form-group input[type="file"],
.admin-form .form-group select,
.admin-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.admin-form .form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.admin-form .form-group input:focus,
.admin-form .form-group textarea:focus {
    border-color: var(--bluelogo);
    box-shadow: 0 0 5px rgba(11, 94, 215, 0.2);
}

/* Page Header Row (Title + Action Button) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h3 {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

/* Table image thumbnails */
.admin-table td img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Form row spacing */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form small {
    color: #888;
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

/* Responsive: tablet */
@media screen and (max-width: 900px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: phones */
@media screen and (max-width: 600px) {
    .page-content {
        padding: 15px;
    }
    .admin-card {
        padding: 15px;
    }
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-table th, .admin-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    /* Hide image column on very small phones */
    .admin-table .col-img {
        display: none;
    }
}

/* =========================================================================
   Gallery Grid
   ========================================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    background: #f9fafb;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay p {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-actions {
    display: flex;
    gap: 8px;
}

@media screen and (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* =========================================================================
   Batch Delete — checkbox column
   ========================================================================= */
.admin-table th.col-check {
    width: 40px;
    text-align: center;
}
.admin-table td.col-check {
    text-align: center;
    vertical-align: middle;
}
.admin-table td.col-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--logored);
}

.batch-delete-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #991b1b;
}
.batch-delete-bar.visible {
    display: flex;
}
.batch-delete-bar .selected-count {
    font-weight: 600;
    flex: 1;
}
.batch-delete-bar .btn-batch-delete {
    padding: 8px 18px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.batch-delete-bar .btn-batch-delete:hover {
    background: #b91c1c;
}

/* =========================================================================
   Action Buttons in Tables — prevent collapse
   ========================================================================= */
.admin-table .actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-table .actions-cell .btn-edit,
.admin-table .actions-cell .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.admin-table .actions-cell .btn-edit:hover,
.admin-table .actions-cell .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* =========================================================================
   Admin Table Search and Per-Page Controls
   ========================================================================= */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.table-toolbar .search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 400px;
}

.table-toolbar .search-box .search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.table-toolbar .search-box .search-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.table-toolbar .search-box input[type="text"] {
    flex: 1;
    padding: 10px 34px 10px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #f8fafc;
    color: #1e293b;
    width: 100%;
}

.table-toolbar .search-box input[type="text"]:focus {
    border-color: var(--bluelogo);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bluelogo) 12%, transparent);
}

.table-toolbar .search-box input[type="text"]:focus ~ .search-input-icon {
    color: var(--bluelogo);
}

.table-toolbar .search-box input[type="text"]::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.table-toolbar .search-box .search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
    line-height: 1;
}

.table-toolbar .search-box .search-clear-btn:hover {
    background: #cbd5e1;
    color: #334155;
}

.table-toolbar .search-box .search-spinner {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bluelogo);
    font-size: 14px;
    z-index: 2;
}

.table-toolbar .search-box .search-submit-btn {
    padding: 10px 14px;
    background: var(--bluelogo);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.table-toolbar .search-box .search-submit-btn:hover {
    background: #0d5fa0;
}

/* Table rows highlight for live search results */
.admin-table tbody tr.search-highlight {
    animation: searchFadeIn 0.25s ease;
}

@keyframes searchFadeIn {
    from { opacity: 0.5; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.table-toolbar .per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.table-toolbar .per-page select {
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.table-toolbar .per-page select:focus {
    border-color: var(--bluelogo);
}

/* Sortable column headers */
.admin-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.admin-table th.sortable:hover {
    background-color: #eef2f7;
}

.admin-table th.sortable .sort-icon {
    margin-left: 4px;
    font-size: 11px;
    color: #9ca3af;
}

.admin-table th.sortable.active .sort-icon {
    color: var(--bluelogo);
}

/* Pagination controls */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-controls a,
.pagination-controls span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    color: #333;
    background: #fff;
    transition: all 0.15s ease;
}

.pagination-controls a:hover {
    background: #f3f4f6;
    border-color: #ccc;
}

.pagination-controls a.active {
    background: var(--logored);
    color: #fff;
    border-color: var(--logored);
}

.pagination-controls span.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 13px;
    color: #6b7280;
    margin-top: 12px;
    text-align: center;
}

/* Inline the suffix with counter number */
.fun-fact-suffix {
    display: inline;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    vertical-align: baseline;
}

@media (max-width: 768px) {
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .table-toolbar .search-box {
        max-width: 100%;
    }
    .admin-table .actions-cell .btn-edit,
    .admin-table .actions-cell .btn-danger {
        min-width: 32px;
        min-height: 32px;
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* =========================================================================
   Status Badges
   ========================================================================= */
.badge-active {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-inactive {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #fee2e2;
    color: #dc2626;
}

.badge-upcoming {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #dbeafe;
    color: #1d4ed8;
}

.badge-cancelled {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #f3f4f6;
    color: #6b7280;
}

/* =========================================================================
   Two-column form row
   ========================================================================= */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media screen and (max-width: 600px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Applications — Stat Cards
   ========================================================================= */
.app-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.app-stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Pending badge */
.badge-pending {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #fef3c7;
    color: #d97706;
}

/* =========================================================================
   Application Detail Table
   ========================================================================= */
.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table tr {
    border-bottom: 1px solid #f3f4f6;
}

.detail-table td {
    padding: 10px 6px;
    font-size: 14px;
    color: var(--text-color);
    vertical-align: top;
}

.detail-table .detail-label {
    font-weight: 600;
    color: #6b7280;
    width: 38%;
    white-space: nowrap;
}

/* Application view 2-column responsive layout */
@media screen and (max-width: 768px) {
    .application-view-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Ensure the applications/view.php inline grid is also responsive */
@media screen and (max-width: 768px) {
    div[style*="grid-template-columns:2fr 1fr"] {
        display: block !important;
    }
    div[style*="grid-template-columns:2fr 1fr"] > .admin-card {
        margin-bottom: 20px;
    }
}



/* =========================================================================
   UPDATE PROFILE PAGE
   ========================================================================= */

.profile-update-card {
    max-width: 750px;
    margin: auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background-color: rgba(11, 94, 215, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bluelogo);
    font-size: 34px;
}

.profile-header-text h3 {
    font-size: 22px;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.profile-header-text p {
    color: #6b7280;
    font-size: 14px;
}

/* Form Inputs */
.admin-form .form-group input[type="email"],
.admin-form .form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 14px;
    background-color: #fff;
}

.admin-form .form-group input[type="email"]:focus,
.admin-form .form-group input[type="password"]:focus {
    border-color: var(--bluelogo);
    box-shadow: 0 0 5px rgba(11, 94, 215, 0.2);
}

/* Password Section */
.password-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.password-section h4 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Buttons Row */
.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.profile-actions .btn-primary,
.profile-actions .btn-danger {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Input Icons */
.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
}

.input-group input {
    padding-right: 40px !important;
}

/* Responsive */
@media screen and (max-width: 600px) {

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        width: 75px;
        height: 75px;
        font-size: 28px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions button {
        width: 100%;
        justify-content: center;
    }
}


/* =========================================================================
   Alert Messages
   ========================================================================= */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
    animation: fadeSlideDown 0.3s ease;
}

.alert-success {
    background-color: #dcfce7;
    color: #15803d;
    border-left-color: #22c55e;
}

.alert-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left-color: #ef4444;
}

/* ── Profile Dropdown ── */
.admin-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.admin-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 230px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 12px 0 8px;
    animation: fadeSlideDown 0.2s ease;
}

/* Show on hover — desktop */
.admin-profile:hover .profile-dropdown,
.admin-profile:focus-within .profile-dropdown {
    display: block;
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Navbar Icon Buttons ── */
.nav-icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #4b5563;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.nav-icon-btn:hover {
    background: #f3f4f6;
    color: var(--logored);
}

/* ── Notifications ── */
.nav-notifications {
    position: relative;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 18px;
    color: #4b5563;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    margin-right: 8px;
}
.nav-notifications:hover {
    background: #f3f4f6;
    color: var(--logored);
}
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -10px;
    width: 320px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: fadeSlideDown 0.2s ease;
}
.notif-dropdown.show {
    display: block;
}
.notif-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #111;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 10px 10px 0 0;
}
.notif-list {
    padding: 0;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
}
.notif-item:hover {
    background: #f9fafb;
}
.notif-item .notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bluelogo);
    flex-shrink: 0;
    margin-top: 5px;
}
.notif-item .notif-text {
    flex: 1;
    line-height: 1.4;
}
.notif-item .notif-time {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}
.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 16px 12px;
    color: #333;
}

.profile-dropdown-header i {
    color: #6c757d;
}

.profile-dropdown-header div {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.profile-dropdown-header strong {
    font-size: 14px;
    color: #111;
}

.profile-dropdown-header small {
    font-size: 12px;
    color: #888;
    word-break: break-all;
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 0 0 6px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13.5px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #000;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: #666;
}

.dropdown-logout {
    color: #e74c3c;
}

.dropdown-logout i {
    color: #e74c3c;
}

/* =========================================================================
   Delete Confirmation Modal
   ========================================================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.2s ease;
}
.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.25s ease;
    overflow: hidden;
}

.modal-header {
    padding: 24px 28px 0;
    text-align: center;
}

.modal-header .modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.modal-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 4px;
    line-height: 1.5;
}

.modal-header .modal-item-name {
    font-weight: 600;
    color: #111827;
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding: 20px 28px 24px;
}

.modal-actions .btn-cancel {
    flex: 1;
    padding: 11px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.modal-actions .btn-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.modal-actions .btn-confirm-delete {
    flex: 1;
    padding: 11px 20px;
    border: none;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.modal-actions .btn-confirm-delete:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}
.modal-actions .btn-confirm-delete:active {
    transform: translateY(0);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}