/* ===========================================================
   Admin UI Template - Core Styles
   Layout: sidebar + topbar + content area
   Framework: Bootstrap 5 (CDN) + Bootstrap Icons (CDN)
   =========================================================== */

:root {
    --admin-bg: #f7f9fc;
    --admin-sidebar: #101828;
    --admin-sidebar-soft: #1d2939;
    --admin-text: #101828;
    --admin-border: #e4e7ec;
    --admin-card: #ffffff;
    --admin-primary: #2563eb;
    --admin-success: #16a34a;
    --admin-warning: #f59e0b;
}

body {
    min-height: 100vh;
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    background: var(--admin-sidebar);
    color: #ffffff;
    padding: 24px 18px;
}

.brand-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #ffffff;
    color: var(--admin-sidebar);
    font-weight: 800;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    padding: 2px;
    border-radius: 8px;
    background: #ffffff;
    flex: 0 0 auto;
}

.menu-label {
    margin: 26px 10px 10px;
    color: #98a2b3;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-menu {
    display: grid;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d0d5dd;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--admin-sidebar-soft);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: 28px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #d0d5dd;
}

.sidebar-user-photo,
.sidebar-user-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex: 0 0 auto;
}

.sidebar-user-photo {
    object-fit: cover;
    background: #ffffff;
}

.sidebar-user-photo-placeholder {
    display: grid;
    place-items: center;
    background: #ffffff;
    color: var(--admin-sidebar);
    font-weight: 800;
}

.min-w-0 {
    min-width: 0;
}

.main-area {
    flex: 1;
    min-width: 0;
    font-size: 0.94rem;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
}

.content-area {
    padding: 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 1px;
}

.panel,
.summary-card {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-card);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.04);
}

.summary-card {
    height: 100%;
}

.icon-box {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--admin-primary);
    font-size: 20px;
}

.icon-box.success {
    background: #ecfdf3;
    color: var(--admin-success);
}

.icon-box.warning {
    background: #fffbeb;
    color: var(--admin-warning);
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--admin-border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-dot {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--admin-primary);
    flex: 0 0 auto;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #ffffff;
}

.avatar,
.photo-placeholder {
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 800;
}

.avatar {
    width: 36px;
    height: 36px;
}

.user-photo,
.photo-placeholder {
    width: 44px;
    height: 44px;
}

.preview-photo,
.preview-placeholder {
    width: 88px;
    height: 88px;
}

.user-photo,
.preview-photo {
    object-fit: cover;
    border-radius: 8px;
    background: #eef2ff;
}

.form-control,
.form-select {
    border-radius: 8px;
    padding: .75rem .9rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    line-height: 1;
}

.dt-container {
    color: var(--admin-text);
}

.dataTables_wrapper {
    color: var(--admin-text);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dt-container .dt-search input,
.dt-container .dt-length select {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: .5rem .75rem;
}

.dataTables_wrapper .dataTables_filter input,
.dt-container .dt-search input {
    margin-left: .5rem;
}

.dataTables_wrapper .dataTables_length select,
.dt-container .dt-length select {
    margin: 0 .4rem;
}

.dataTables_wrapper .page-link,
.dt-container .page-link {
    color: var(--admin-sidebar);
    border-color: var(--admin-border);
}

.dataTables_wrapper .active > .page-link,
.dataTables_wrapper .page-link.active,
.dt-container .active > .page-link,
.dt-container .page-link.active {
    background: var(--admin-sidebar);
    border-color: var(--admin-sidebar);
    color: #ffffff;
}

.mobile-menu-button {
    display: none;
}

@media (max-width: 991.98px) {
    .admin-layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: static;
        padding: 16px;
    }

    .sidebar-menu-wrap {
        display: none;
        padding-top: 16px;
    }

    .sidebar-menu-wrap.show {
        display: block;
    }

    .brand-box {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .topbar {
        padding: 18px 20px;
        align-items: flex-start;
        flex-direction: column;
    }

    .content-area {
        padding: 24px 20px;
    }
}

/* ===========================================================
   Login page styles
   =========================================================== */

.login-page-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, 0.12), transparent 34rem),
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    color: #111827;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
    min-height: 100vh;
}

.login-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    background: #ffffff;
}

.login-page-body .form-control {
    border-radius: 10px;
    border-color: #dbe3ef;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.login-page-body .form-control:focus {
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.login-page-body .btn-dark {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: #111827;
    border: none;
    transition: all 0.2s ease;
}

.login-page-body .btn-dark:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.footer-copyright {
    font-size: 0.85rem;
    color: #64748b;
    letter-spacing: 0.02em;
}
