/* ============================================================
   GURUOFPOLICY - Enterprise Design System (World-Class UI)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4318FF;
    /* Vibrant Indigo */
    --primary-hover: #3311DB;
    --secondary: #E9EDF7;
    /* Soft Gray-Blue */
    --accent: #00B574;
    /* Emerald Success */
    --danger: #EE5D50;
    /* Coral Red */
    --warning: #FFB547;
    /* Sun Yellow */
    --info: #39B8FF;
    /* Sky Blue */

    --bg-body: #F4F7FE;
    /* Soft background */
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    /* Sleek White Sidebar */

    --text-main: #2B3674;
    /* Deep Navy for headings */
    --text-body: #A3AED0;
    /* Soft grayish blue for text */
    --text-muted: #A3AED0;

    --border-light: #E0E5F2;

    --shadow-soft: 0px 18px 40px rgba(112, 144, 176, 0.12);
    --shadow-hover: 0px 20px 40px rgba(112, 144, 176, 0.20);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;

    --sidebar-width: 280px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.text-main {
    color: var(--text-main);
    font-weight: 700;
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 14px 17px 40px 4px rgba(112, 144, 176, 0.08);
}

.sidebar-brand {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 15px rgba(67, 24, 255, 0.3);
}

.sidebar-brand .brand-text h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    padding: 10px 20px;
    flex: 1;
}

.sidebar-nav .nav-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 16px;
    margin-bottom: 12px;
    margin-top: 24px;
    font-weight: 700;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-body);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.sidebar-nav .nav-link i {
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.sidebar-nav .nav-link:hover {
    background: var(--bg-body);
    color: var(--text-main);
    transform: translateX(4px);
}

.sidebar-nav .nav-link:hover i {
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 24, 255, 0.25);
    font-weight: 600;
}

.sidebar-nav .nav-link.active i {
    color: white;
}

/* Main Content area */
.admin-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.admin-topbar {
    background: rgba(244, 247, 254, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar .page-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -1px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 14px 17px 40px 4px rgba(112, 144, 176, 0.08);
}

.topbar-right .profile-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
}

.topbar-right .profile-dropdown img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-content {
    padding: 0 32px 32px;
    flex: 1;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.card-custom {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
    transition: var(--transition);
}

.card-custom:hover {
    box-shadow: var(--shadow-hover);
}

.card-header-custom {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
}

.card-header-custom h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.card-body-custom {
    padding: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: rgba(67, 24, 255, 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background: rgba(0, 181, 116, 0.1);
    color: var(--accent);
}

.stat-icon.info {
    background: rgba(57, 184, 255, 0.1);
    color: var(--info);
}

.stat-icon.warning {
    background: rgba(255, 181, 71, 0.1);
    color: var(--warning);
}

.stat-info .stat-label {
    font-size: 14px;
    color: var(--text-body);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info .stat-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    color: var(--text-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.table-custom tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #F8FAFC;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-responsive-custom {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   BADGES & BUTTONS
   ============================================================ */
.badge-custom {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-custom.admin {
    background: rgba(67, 24, 255, 0.1);
    color: var(--primary);
}

.badge-custom.user {
    background: var(--secondary);
    color: var(--text-main);
}

.badge-custom.success {
    background: rgba(0, 181, 116, 0.1);
    color: var(--accent);
}

.badge-custom.danger {
    background: rgba(238, 93, 80, 0.1);
    color: var(--danger);
}

.badge-custom.info {
    background: rgba(57, 184, 255, 0.1);
    color: var(--info);
}

.btn-primary-custom {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(67, 24, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.btn-danger-custom {
    background: rgba(238, 93, 80, 0.1);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger-custom:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(238, 93, 80, 0.3);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--border-light);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 8px 20px;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(67, 24, 255, 0.05);
}

/* ============================================================
   AUTH PAGES (Glassmorphism Login)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(67, 24, 255, 0.15) 0%, rgba(244, 247, 254, 0) 70%);
    top: -200px;
    right: -200px;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 181, 116, 0.1) 0%, rgba(244, 247, 254, 0) 70%);
    bottom: -150px;
    left: -150px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.auth-card .brand {
    text-align: center;
    margin-bottom: 35px;
}

.auth-card .brand .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(67, 24, 255, 0.3);
}

.auth-card .brand h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px;
}

.auth-card .btn-auth {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    margin-top: 16px;
    transition: var(--transition);
}

.auth-card .btn-auth:hover {
    background: var(--primary-hover);
    box-shadow: 0 8px 20px rgba(67, 24, 255, 0.3);
    transform: translateY(-2px);
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-card);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 14px;
}

/* User Dashboard NavBar */
.user-navbar {
    background: white;
    box-shadow: var(--shadow-soft);
    padding: 15px 32px;
}

/* Mobile */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .btn-toggle-sidebar {
        display: block;
        border: none;
        background: transparent;
        font-size: 24px;
        color: var(--text-main);
    }
}

@media (min-width: 992px) {
    .btn-toggle-sidebar {
        display: none;
    }
}