/**
 * ==============================================================================
 * EDNOVATECHS - Admin Panel Core CSS
 * CV. EDUNOVA TECHNOLOGIES
 * Brand: EDNOVATECHS | Banjarbaru, Kalimantan Selatan
 * Modern, Professional, Responsive Admin Design System
 * ==============================================================================
 */

:root {
    --admin-sidebar-w: 260px;
    --admin-sidebar-bg: #0B192C;
    --admin-sidebar-hover: rgba(255, 255, 255, 0.06);
    --admin-sidebar-active: #1E3E62;
    --admin-accent: #008DDA;
    --admin-accent-rgb: 0, 141, 218;
    --admin-cyan: #41C9E2;
    --admin-bg: #F8FAFC;
    --admin-surface: #FFFFFF;
    --admin-text-main: #1E293B;
    --admin-text-muted: #64748B;
    --admin-border: #E2E8F0;
    --admin-card-radius: 12px;
}

body.admin-body {
    background-color: var(--admin-bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--admin-text-main);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    width: 100%;
}

/* --- Admin Sidebar --- */
.admin-sidebar {
    width: var(--admin-sidebar-w);
    background-color: var(--admin-sidebar-bg);
    color: #E2E8F0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 2px 0 12px rgba(11, 25, 44, 0.15);
}

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.admin-sidebar .sidebar-brand {
    padding: 20px 20px 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-sidebar .sidebar-brand a {
    text-decoration: none;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #008DDA 0%, #41C9E2 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 141, 218, 0.35);
}

.admin-sidebar .brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.admin-sidebar .brand-subtitle {
    font-size: 0.72rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

/* Sidebar Menu Items */
.sidebar-menu {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748B;
    padding: 14px 12px 6px 12px;
    margin-top: 8px;
}

.sidebar-heading:first-child {
    margin-top: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 3px;
}

.sidebar-link {
    color: #94A3B8;
    padding: 9px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-link i.menu-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #94A3B8;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #FFFFFF;
    background-color: var(--admin-sidebar-hover);
}

.sidebar-link:hover i.menu-icon {
    color: var(--admin-cyan);
}

.sidebar-link.active {
    color: #FFFFFF;
    background-color: var(--admin-sidebar-active);
    font-weight: 600;
}

.sidebar-link.active i.menu-icon {
    color: var(--admin-cyan);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background-color: var(--admin-accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-link.is-disabled {
    opacity: 0.65;
    cursor: default;
}

.sidebar-link.is-disabled:hover {
    background-color: transparent;
    color: #94A3B8;
}

.badge-coming-soon {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #94A3B8;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-left: auto;
}

/* Sidebar Backdrop on Mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 25, 44, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

/* --- Admin Main Content --- */
.admin-main {
    margin-left: var(--admin-sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: var(--admin-bg);
}

.admin-content {
    flex: 1;
    padding: 24px 32px;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.admin-topbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--admin-border);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    border: 1px solid var(--admin-border);
    background: #FFFFFF;
    color: var(--admin-text-main);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: #F1F5F9;
    color: var(--admin-accent);
}

.topbar-breadcrumb {
    margin: 0;
    font-size: 0.88rem;
}

.topbar-breadcrumb .breadcrumb-item a {
    color: var(--admin-text-muted);
    text-decoration: none;
}

.topbar-breadcrumb .breadcrumb-item.active {
    color: var(--admin-text-main);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #F1F5F9;
    border: 1px solid var(--admin-border);
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E3E62 0%, #008DDA 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.admin-card {
    background: #FFFFFF;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
    position: relative;
}

.admin-card-header {
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--admin-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-card-subtitle {
    font-size: 0.82rem;
    color: var(--admin-text-muted);
    margin-top: 2px;
}

/* Metric Stats Cards */
.metric-card {
    background: #FFFFFF;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 25, 44, 0.06);
}

.metric-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.metric-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--admin-text-main);
    line-height: 1.1;
    margin: 4px 0 2px 0;
}

.metric-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--admin-text-muted);
    margin: 0;
}

/* ==========================================================================
   REUSABLE TABLE STYLING
   ========================================================================== */
.table-admin {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}

.table-admin thead th {
    background-color: #F8FAFC;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
    border-top: none;
    white-space: nowrap;
}

.table-admin tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.88rem;
    color: #334155;
    background-color: #FFFFFF;
}

.table-admin tbody tr:hover td {
    background-color: #F8FAFC;
}

.table-admin tbody tr:last-child td {
    border-bottom: none;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.success {
    background-color: #DCFCE7;
    color: #166534;
}

.status-pill.warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-pill.danger {
    background-color: #FEE2E2;
    color: #991B1B;
}

.status-pill.info {
    background-color: #E0F2FE;
    color: #075985;
}

.status-pill.neutral {
    background-color: #F1F5F9;
    color: #475569;
}

/* ==========================================================================
   EMPTY STATE UI
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #FFFFFF;
    border: 1.5px dashed #CBD5E1;
    border-radius: var(--admin-card-radius);
    margin: 16px 0;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-text-main);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 0.88rem;
    color: var(--admin-text-muted);
    max-width: 420px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

/* ==========================================================================
   FORM CONTROLS & VALIDATION
   ========================================================================== */
.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--admin-text-main);
    margin-bottom: 6px;
}

.form-label.required::after {
    content: " *";
    color: #DC2626;
    font-weight: bold;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #CBD5E1;
    padding: 9px 14px;
    font-size: 0.9rem;
    color: #1E293B;
    transition: all 0.2s ease;
}

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

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #DC2626;
}

.invalid-feedback {
    font-size: 0.8rem;
    font-weight: 500;
    color: #DC2626;
    margin-top: 4px;
}

.form-text {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

/* ==========================================================================
   ADMIN FOOTER
   ========================================================================== */
.admin-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--admin-border);
    padding: 16px 32px;
    font-size: 0.82rem;
    color: var(--admin-text-muted);
    margin-top: auto;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle-btn {
        display: inline-flex;
    }

    .admin-topbar {
        padding: 12px 16px;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-footer {
        padding: 14px 16px;
        text-align: center;
    }
}

/* ==========================================================================
   EDNOVATECHS - LOGIN PAGE REDESIGN
   ========================================================================== */
.login-viewport {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    background: radial-gradient(circle at 12% 18%, rgba(0, 141, 218, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 88% 82%, rgba(65, 201, 226, 0.16) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(30, 62, 98, 0.35) 0%, transparent 65%),
                linear-gradient(135deg, #07101E 0%, #0B192C 40%, #102A43 75%, #1E3E62 100%);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Subtle ambient decorative orbs */
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}

.login-orb-1 {
    width: 420px;
    height: 420px;
    top: -80px;
    left: -80px;
    background: radial-gradient(circle, rgba(0, 141, 218, 0.28) 0%, rgba(0, 141, 218, 0) 70%);
    animation: orbFloat 12s ease-in-out infinite alternate;
}

.login-orb-2 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(65, 201, 226, 0.2) 0%, rgba(65, 201, 226, 0) 70%);
    animation: orbFloat 16s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 20px) scale(1.08); }
}

/* Central Login Container */
.login-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: loginCardSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Card */
.login-card {
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(7, 16, 30, 0.35), 0 4px 16px rgba(0, 141, 218, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 38px 36px 32px 36px;
    position: relative;
}

/* Brand Emblem & Header */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 22px;
}

.login-brand-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #008DDA 0%, #41C9E2 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(0, 141, 218, 0.35);
    margin-bottom: 14px;
}

.login-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0B192C;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.login-brand-subtitle {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748B;
    margin-top: 4px;
    display: block;
}

/* Welcome Message */
.login-welcome {
    text-align: center;
    margin-bottom: 22px;
}

.login-welcome-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.login-welcome-sub {
    font-size: 0.86rem;
    color: #64748B;
    margin: 0;
    line-height: 1.45;
}

/* Form Styling & Floating Inputs */
.login-form-group {
    margin-bottom: 18px;
}

.login-form-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-input-group {
    display: flex;
    position: relative;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.login-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background-color: #F8FAFC;
    border: 1.5px solid #CBD5E1;
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #64748B;
    font-size: 1.05rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.login-input-control {
    flex: 1;
    border: 1.5px solid #CBD5E1;
    border-left: none;
    padding: 11px 14px;
    font-size: 0.92rem;
    color: #0F172A;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
}

.login-input-control:not(.has-toggle) {
    border-radius: 0 12px 12px 0;
}

.login-input-control.has-toggle {
    border-radius: 0;
    border-right: none;
}

.login-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background-color: #F8FAFC;
    border: 1.5px solid #CBD5E1;
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: #64748B;
    font-size: 1.1rem;
    cursor: pointer;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.login-password-toggle:hover {
    color: #008DDA;
    background-color: #F1F5F9;
}

.login-input-group:focus-within {
    box-shadow: 0 0 0 3.5px rgba(0, 141, 218, 0.15);
}

.login-input-group:focus-within .login-input-icon,
.login-input-group:focus-within .login-input-control,
.login-input-group:focus-within .login-password-toggle {
    border-color: #008DDA;
}

.login-input-group:focus-within .login-input-icon {
    color: #008DDA;
}

.login-input-control:focus {
    outline: none;
}

/* Submit Button */
.login-btn-submit {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, #008DDA 0%, #1E3E62 100%);
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 141, 218, 0.28);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 6px;
}

.login-btn-submit:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 141, 218, 0.38);
    background: linear-gradient(135deg, #059BE5 0%, #173250 100%);
}

.login-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 141, 218, 0.2);
}

.login-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
}

/* Soft Redesigned Alerts */
.login-alert {
    border-radius: 12px;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-width: 1px;
    border-style: solid;
    line-height: 1.45;
}

.login-alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border-color: #A7F3D0;
}

.login-alert-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

.login-alert-warning {
    background-color: #FFFBEB;
    color: #92400E;
    border-color: #FDE68A;
}

.login-alert-info {
    background-color: #F0F9FF;
    color: #075985;
    border-color: #BAE6FD;
}

.login-alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: -1px;
}

.login-alert-close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    color: inherit;
}

.login-alert-close:hover {
    opacity: 1;
}

/* Secondary Navigation */
.login-nav-back {
    text-align: center;
    padding-top: 18px;
    margin-top: 20px;
    border-top: 1px solid #F1F5F9;
}

.login-nav-back a {
    color: #64748B;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.login-nav-back a:hover {
    color: #008DDA;
    transform: translateX(-2px);
}

/* Copyright Footer */
.login-footer-copy {
    text-align: center;
    margin-top: 18px;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.75);
    letter-spacing: 0.02em;
}

/* Responsive Overrides */
@media (max-width: 575.98px) {
    .login-viewport {
        padding: 20px 12px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .login-brand-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .login-welcome-title {
        font-size: 1.2rem;
    }
}
