:root {
    --sidebar-gradient: linear-gradient(180deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --button-gradient: linear-gradient(135deg, #203a43 0%, #2c5364 100%);
    --primary-color: #2c5364;
    --accent-color: #38bdf8;
    --bg-color: #f0f4f8;
    --text-main: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* ===== Sidebar ===== */
.admin-sidebar {
    background: var(--sidebar-gradient);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    color: #fff;
}

aside.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1030;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

aside.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

aside.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

aside.admin-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}

aside.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.admin-sidebar.offcanvas {
    width: var(--sidebar-width);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-brand i {
    font-size: 24px;
    color: var(--accent-color);
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.sidebar-brand-sub {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.8;
}

.sidebar-scroll {
    padding-bottom: 1rem;
}

.admin-sidebar .sidebar-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 20px 24px 10px;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    border-left: 4px solid transparent;
    margin-bottom: 0;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.admin-sidebar .nav-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.admin-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: var(--accent-color);
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2) 0%, transparent 100%);
    color: #fff;
    border-left-color: var(--accent-color);
}

/* ===== Main wrapper / header ===== */
.admin-main {
    margin-left: 0;
}

@media (min-width: 768px) {
    .admin-main {
        margin-left: var(--sidebar-width);
    }
}

.admin-header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-menu-toggle {
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.admin-search {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.admin-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.85rem;
}

.admin-search input {
    width: 100%;
    padding: 0.55rem 0.9rem 0.55rem 2.4rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    background: #f8fafc;
    font-size: 0.85rem;
    transition: 0.3s;
}

.admin-search input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
    background: #fff;
}

.admin-notification {
    position: relative;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.15rem;
    display: inline-flex;
}

.admin-notification-btn {
    padding: 0.35rem;
    line-height: 1;
}

.notification-count-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border: 2px solid #fff;
}

.notification-dropdown {
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    white-space: normal;
}

.notification-item-icon {
    color: var(--accent-color);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.notification-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}

.notification-item-subtitle {
    font-size: 0.74rem;
    color: var(--text-light);
}

/* ===== Sidebar pending-review badges ===== */
.nav-pending-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
}

.admin-profile-btn {
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
}

.admin-profile-btn:hover {
    background-color: #f8fafc;
}

.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--button-gradient);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Profile photo upload ===== */
.photo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.photo-placeholder:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #f0f9ff;
}

.photo-placeholder i {
    font-size: 24px;
    margin-bottom: 5px;
}

.photo-placeholder span {
    font-size: 12px;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* ===== Content area ===== */
.admin-content {
    background-color: var(--bg-color);
}

.admin-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

/* ===== Component skin: cards, buttons, forms, tables ===== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--button-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(44, 83, 100, 0.3);
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--button-gradient);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 83, 100, 0.4);
}

.btn-secondary,
.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary {
    background-color: #e2e8f0;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
    border-color: #cbd5e1;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--border-color);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.table thead th {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.badge {
    font-weight: 600;
}

/* ===== Detail view (modal) key-value tables ===== */
.detail-section-title {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    margin: 1.25rem 0 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--accent-color);
}

.detail-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

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

.detail-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color);
}

.detail-table td {
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    vertical-align: top;
}

.detail-table td.detail-label {
    width: 36%;
    background-color: var(--bg-color);
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
}

.detail-table td.detail-value {
    color: var(--text-main);
}

/* ===== Image / file upload widgets (News & Announcements, etc.) ===== */
.image-upload-box {
    width: 100%;
    max-width: 280px;
    height: 160px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
    position: relative;
}

.image-upload-box:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #f0f9ff;
}

.image-upload-box i {
    font-size: 24px;
    margin-bottom: 5px;
}

.image-upload-box span {
    font-size: 12px;
}

.image-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.file-upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
    color: var(--text-light);
    max-width: 320px;
}

.file-upload-box:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #f0f9ff;
}

.file-upload-box i {
    font-size: 22px;
    flex-shrink: 0;
}

.file-upload-box .file-upload-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.85rem;
}

.thumb-sm {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

/* Wider than .thumb-sm — course thumbnails are landscape, a square crop cuts them off too tight. */
.thumb-course {
    width: 72px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}
