:root {
    --bg-root: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent-color: #c99a2e;
    --accent-hover: #b28525;
    --accent-light: rgba(201, 154, 46, 0.08);
    --primary-navy: #0a2342;
    --primary-navy-light: #153256;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
    --bg-root: #070c14;
    --bg-card: #0c1524;
    --border-color: rgba(201, 154, 46, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-light: rgba(201, 154, 46, 0.12);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.jnr-dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-root);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: var(--transition);
}

/* 1. Collapsible Sidebar */
.jnr-sidebar {
    width: 260px;
    background-color: var(--primary-navy);
    border-right: 1px solid var(--border-color);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    transition: var(--transition);
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    z-index: 99;
}

.jnr-sidebar.collapsed {
    width: 78px;
}

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

.jnr-sidebar.collapsed .jnr-sidebar-header {
    justify-content: center;
}

.jnr-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
}

.jnr-logo-text {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #ffffff;
    transition: opacity 0.2s;
}

.jnr-sidebar.collapsed .jnr-logo-text {
    display: none;
}

.jnr-collapse-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.jnr-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.jnr-sidebar.collapsed .jnr-collapse-btn svg {
    transform: rotate(180deg);
}

.jnr-sidebar-nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.jnr-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.jnr-menu-divider {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1px;
    padding: 15px 12px 5px 12px;
    white-space: nowrap;
    overflow: hidden;
}

.jnr-sidebar.collapsed .jnr-menu-divider {
    display: none;
}

.jnr-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.jnr-menu-item a svg {
    color: rgba(255, 255, 255, 0.45);
    transition: var(--transition);
    flex-shrink: 0;
}

.jnr-menu-item.active a,
.jnr-menu-item a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.jnr-menu-item.active a svg,
.jnr-menu-item a:hover svg {
    color: var(--accent-color);
}

.jnr-sidebar.collapsed .jnr-menu-item a span {
    display: none;
}

.jnr-sidebar.collapsed .jnr-menu-item a {
    justify-content: center;
    padding: 10px 0;
}

/* 2. Header Layout */
.jnr-main-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex children from stretching */
}

.jnr-header {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 98;
    box-shadow: var(--shadow-sm);
}

.jnr-breadcrumb {
    font-size: 13px;
    display: flex;
    align-items: center;
}

.jnr-search-bar input {
    background: var(--bg-root);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-primary);
    width: 220px;
    font-size: 12px;
    outline: none;
    transition: var(--transition);
}

.jnr-search-bar input:focus {
    border-color: var(--accent-color);
    width: 260px;
    box-shadow: 0 0 0 2px var(--accent-light);
}

.jnr-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jnr-theme-toggle, .jnr-notification-trigger {
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.jnr-theme-toggle:hover, .jnr-notification-trigger:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background-color: var(--bg-root);
}

.jnr-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-color);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jnr-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
}

.jnr-user-profile img {
    border-radius: 50%;
    border: 1.5px solid var(--accent-color);
}

/* 3. Notifications Dropdown list drawer */
.jnr-notifications-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    right: auto;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 101;
    text-align: right;
}

.jnr-notifications-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 13px;
}

.jnr-notifications-list {
    max-height: 280px;
    overflow-y: auto;
}

.jnr-notification-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    transition: var(--transition);
}

.jnr-notification-item:hover {
    background-color: var(--bg-root);
}

.jnr-notification-item.unread {
    background-color: var(--accent-light);
    border-right: 3px solid var(--accent-color);
}

/* 4. Page Content area */
.jnr-content {
    padding: 32px;
    flex-grow: 1;
    overflow-y: auto;
    box-sizing: border-box;
}

/* 5. Vercel Style Cards */
.jnr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.jnr-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.jnr-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(201, 154, 46, 0.4);
}

.jnr-card-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.jnr-card-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

/* 6. Modals Layout with backdrop blur */
.jnr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.jnr-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: jnrModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes jnrModalSlideUp {
    from {
        transform: translateY(12px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.jnr-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jnr-modal-body {
    padding: 24px;
}

/* 7. Toast Alerts Stack */
.jnr-toast-stack {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.jnr-toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    min-width: 260px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: jnrToastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-primary);
}

.jnr-toast.success { border-left-color: #22c55e; }
.jnr-toast.warning { border-left-color: #f59e0b; }
.jnr-toast.error   { border-left-color: #ef4444; }

@keyframes jnrToastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 8. Forms & Inputs */
.jnr-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jnr-form-group label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
}

.jnr-form-group input[type="text"],
.jnr-form-group input[type="email"],
.jnr-form-group input[type="password"],
.jnr-form-group textarea {
    padding: 10px 14px;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}

.jnr-form-group select {
    height: 42px !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    line-height: 1.2 !important;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 16px;
    padding-left: 36px !important;
}

.jnr-form-group input:focus,
.jnr-form-group textarea:focus,
.jnr-form-group select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* Custom premium buttons */
.jnr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.jnr-btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.jnr-btn-primary:hover {
    background-color: var(--accent-hover);
}

.jnr-btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.jnr-btn-secondary:hover {
    background-color: var(--bg-root);
}

/* 9. Skeleton Loader placeholder style */
.jnr-skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-root) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: jnrShimmer 1.5s infinite;
    border-radius: 4px;
    display: block;
}

@keyframes jnrShimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.jnr-skeleton-text { height: 14px; width: 100%; margin-bottom: 8px; }
.jnr-skeleton-title { height: 24px; width: 60%; margin-bottom: 16px; }

/* 10. Responsive layouts side overlays */
@media(max-width: 900px) {
    .jnr-sidebar {
        width: 78px;
    }
    .jnr-sidebar-header .jnr-collapse-btn {
        display: none;
    }
    .jnr-sidebar .jnr-logo-text,
    .jnr-sidebar .jnr-menu-item span,
    .jnr-sidebar .jnr-menu-divider {
        display: none;
    }
    .jnr-sidebar .jnr-menu-item a {
        justify-content: center;
        padding: 10px 0;
    }
}

/* 11. Premium Table Styles */
.jnr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: right;
}

.jnr-table th {
    background-color: var(--primary-navy);
    color: #ffffff;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.jnr-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.jnr-table tr:hover {
    background-color: var(--accent-light);
}

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

/* Category Checkbox Box custom style */
.jnr-category-checklist label {
    transition: var(--transition);
    padding: 4px 6px;
    border-radius: 4px;
}

.jnr-category-checklist label:hover {
    background-color: var(--accent-light);
}

