/* ============================================
   YUK MEETING ASIK — Elegant Theme
   ============================================ */

:root {
    --navy-900: #0a1628;
    --navy-800: #0f1f3a;
    --navy-700: #16294a;
    --navy-600: #1e3a5f;
    --navy-500: #2c5282;
    --navy-400: #4a7ba7;
    --navy-300: #7ba3c9;
    --navy-200: #b8cfe3;
    --navy-100: #e1ecf5;
    --navy-50:  #f5f9fc;

    --burgundy-900: #450a0a;
    --burgundy-800: #7f1d1d;
    --burgundy-700: #991b1b;
    --burgundy-600: #b91c1c;
    --burgundy-500: #dc2626;
    --burgundy-100: #fee2e2;
    --burgundy-50:  #fef2f2;

    --accent-blue: #60a5fa;
    --accent-blue-soft: #93c5fd;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --bg-page: #f5f7fa;
    --bg-card: #ffffff;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow-md: 0 4px 12px -2px rgb(15 23 42 / 0.08);
    --shadow-lg: 0 10px 30px -5px rgb(15 23 42 / 0.12);
    --shadow-xl: 0 20px 50px -10px rgb(15 23 42 / 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --sidebar-width: 260px;
    --topbar-height: 72px;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   LAYOUT WRAPPER
   ============================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    transition: margin-left 0.3s ease;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--navy-900);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-height: var(--topbar-height);
}

.sidebar-header .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--burgundy-700), var(--burgundy-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4);
    flex-shrink: 0;
}

.sidebar-header .brand-text {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sidebar-header .brand-text .accent {
    color: var(--accent-blue-soft);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section {
    padding: 16px 12px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.35);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--navy-700) 0%, rgba(153, 27, 27, 0.35) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, var(--burgundy-500), var(--burgundy-700));
    border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon {
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-item .nav-label {
    flex: 1;
}

.nav-item .nav-badge {
    font-size: 9px;
    font-weight: 700;
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent-blue-soft);
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nav-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    height: var(--topbar-height);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    margin: 0;
}

.topbar-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-700), var(--burgundy-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.topbar-user-info {
    display: none;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-800);
}

.topbar-user-role {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-logout {
    background: var(--burgundy-700);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.25);
}

.btn-logout:hover {
    background: var(--burgundy-600);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(153, 27, 27, 0.35);
}

/* Hamburger (mobile only) */
.btn-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--navy-700);
}

/* Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 28px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    margin: 0 0 4px 0;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(15, 31, 58, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--navy-700);
}

.stat-card.accent::before {
    background: linear-gradient(180deg, var(--burgundy-700), var(--burgundy-500));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-card.accent .stat-value {
    color: var(--burgundy-800);
}

/* ============================================
   WELCOME CARD
   ============================================ */
.welcome-card {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(153, 27, 27, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-card .welcome-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--accent-blue-soft);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.welcome-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.welcome-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    margin: 8px 0;
    position: relative;
    z-index: 1;
}

.welcome-card .role-highlight {
    color: var(--accent-blue-soft);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    letter-spacing: 0.01em;
    font-family: inherit;
}

.btn-primary {
    background: var(--navy-900);
    color: #fff;
    box-shadow: 0 4px 14px rgba(10, 22, 40, 0.3);
}

.btn-primary:hover {
    background: var(--navy-700);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10, 22, 40, 0.4);
}

.btn-accent {
    background: var(--burgundy-700);
    color: #fff;
    box-shadow: 0 4px 14px rgba(153, 27, 27, 0.3);
}

.btn-accent:hover {
    background: var(--burgundy-600);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
}

.btn-ghost:hover {
    background: #f1f5f9;
    color: var(--navy-700);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 50%, var(--navy-700) 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(153, 27, 27, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--burgundy-700), var(--burgundy-500));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(153, 27, 27, 0.4);
}

.login-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    margin: 0 0 4px 0;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 4px rgba(44, 82, 130, 0.1);
}

.form-input.error {
    border-color: var(--burgundy-500);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    width: auto;
    min-width: 140px;
}

.form-error {
    color: var(--burgundy-700);
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.form-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--burgundy-700);
    cursor: pointer;
}

.form-check label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ============================================
   ALERT
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left: 3px solid #22c55e;
}

.alert-error {
    background: var(--burgundy-50);
    color: var(--burgundy-800);
    border-left: 3px solid var(--burgundy-700);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

/* ============================================
   CARD
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(15, 31, 58, 0.05);
    overflow: hidden;
}

/* ============================================
   TABLE
   ============================================ */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: var(--navy-50);
    border-bottom: 2px solid var(--navy-100);
}

.table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: var(--navy-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-title {
    font-weight: 600;
    color: var(--navy-800);
}

.table-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px !important;
    font-style: italic;
}

.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ============================================
   BUTTON ICON
   ============================================ */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
    background: transparent;
    text-decoration: none;
}

.btn-icon-edit {
    color: var(--navy-600);
    background: var(--navy-50);
}

.btn-icon-edit:hover {
    background: var(--navy-100);
    color: var(--navy-800);
}

.btn-icon-delete {
    color: var(--burgundy-700);
    background: var(--burgundy-50);
}

.btn-icon-delete:hover {
    background: var(--burgundy-100);
    color: var(--burgundy-800);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.badge-navy {
    background: var(--navy-100);
    color: var(--navy-800);
}

.badge-burgundy {
    background: var(--burgundy-100);
    color: var(--burgundy-800);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-muted {
    background: #f1f5f9;
    color: #64748b;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrap {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
}

.pagination-wrap nav {
    display: flex;
    gap: 4px;
}

.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--navy-700);
    background: transparent;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.pagination-wrap a:hover {
    background: var(--navy-50);
    border-color: var(--navy-200);
}

.pagination-wrap .active span,
.pagination-wrap [aria-current="page"] span {
    background: var(--navy-800);
    color: #fff;
    border-color: var(--navy-800);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 1024px) {
    .topbar-user-info {
        display: flex;
    }
}

@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .btn-hamburger {
        display: inline-flex;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-title {
        font-size: 16px;
    }

    .topbar-subtitle {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    .page-title {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-value {
        font-size: 22px;
    }

    .welcome-card {
        padding: 28px 24px;
    }

    .welcome-card h2 {
        font-size: 22px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 22px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-form {
        width: 100%;
    }

    .toolbar-form .form-input-sm {
        width: 100%;
        min-width: 0;
    }

    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
    }

    .table th {
        font-size: 11px;
    }

    .table-actions {
        flex-direction: column;
    }

    .card[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .topbar-user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}