:root {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f1f5f9;
    --text-muted: #cbd5e1;
    --error: #f43f5e;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lexend', sans-serif;
    background: transparent;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    padding: 20px;
    line-height: 1.6;
}

.login-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.login-bg.loaded {
    opacity: 1;
}

.login-bg-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 8, 18, 0.75) 0%,
            rgba(15, 23, 42, 0.65) 50%,
            rgba(10, 8, 18, 0.85) 100%);
}

/* Cinematic Background Transition */
.background-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Above global bg, below card wrap */
    overflow: hidden;
}

.bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-open {
    background-image: url('eyes open.png');
}

.bg-closed {
    background-image: url('eyes close.png');
}

.bg-layer.active {
    opacity: 1;
    z-index: 2;
}

.login-card-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.login-brand-fix {
    margin-bottom: 8px;
}

.login-brand-fix .nav-logo {
    width: 32px;
    height: 32px;
    padding: 5px;
}

.login-brand-fix .nav-title {
    font-size: 16px;
}

.login-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 32px 28px;
    width: 300px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-card input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 13px 16px;
    color: #f8fafc;
    font-size: 14px;
    font-family: 'Lexend', sans-serif;
    transition: all 0.25s ease;
    outline: none;
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-card input:focus {
    border-color: rgba(129, 140, 248, 0.7);
    background: rgba(129, 140, 248, 0.08);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.login-card .btn {
    margin-top: 4px;
    background: var(--primary);
    font-size: 14px;
    padding: 13px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

.login-card .btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.login-card .error-msg {
    font-size: 12px;
    margin: 0;
    min-height: 0;
}

.login-card .error-msg:empty {
    display: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

@media (max-width: 600px) {
    #login-view {
        justify-content: center;
        padding-right: 0;
    }

    .login-card {
        width: 280px;
    }
}

#app {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.view {
    display: none;
    flex-direction: column;
    width: 100%;
    min-width: 100%;
    /* Ensure it stays wide even if empty */
    animation: fadeIn 0.4s ease-out;
}

#login-view {
    display: flex;
    /* visible immediately — JS inline style overrides when switching views */
    flex-direction: row;
    position: fixed !important;
    inset: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    animation: none;
    align-items: center;
    justify-content: flex-end;
    padding-right: 7%;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.error-msg {
    color: var(--error);
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 20px;
    text-align: center;
}

/* Dashboard Styles */
#dashboard-view,
#add-view {
    width: 100%;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #c084fc);
    color: white;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(129, 140, 248, 0.4);
    flex-shrink: 0;
}

.logo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-title {
    font-weight: 600;
    font-size: 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-subtitle {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 14px;
    opacity: 0.8;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: auto;
    padding: 8px 16px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-content,
.form-content {
    max-width: none;
    margin: 0 auto;
    width: 100%;
}

.dashboard-header,
.form-header {
    margin-bottom: 40px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2,
.form-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.btn-icon {
    background: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-icon:hover {
    background: var(--primary-hover);
    transform: rotate(90deg) scale(1.1);
}

/* Grid Styling */
.grid-container {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow-x: auto; /* Changed from overflow: hidden to allow horizontal scroll */
    box-shadow: var(--glass-shadow);
    position: relative;
}

/* Custom scrollbar for the grid */
.grid-container::-webkit-scrollbar {
    height: 8px;
}

.grid-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 0 0 20px 20px;
}

.grid-container::-webkit-scrollbar-thumb {
    background: rgba(129, 140, 248, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.grid-container::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.4);
    background-clip: padding-box;
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    table-layout: auto;
}

.data-grid th,
.data-grid td {
    white-space: normal; /* Allow wrapping for long IDs */
    word-break: break-word;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.data-grid th {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
    white-space: nowrap; /* Headers stay on one line */
}

/* Specific columns that should not wrap */
.data-grid td:nth-child(1), /* Ref No */
.data-grid td:nth-child(2), /* Date */
.data-grid td:nth-child(7), /* Status */
.data-grid td:nth-child(10) /* Actions */ {
    white-space: nowrap;
}

/* Optimization for long IDs */
.code-id {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    cursor: help;
}

.code-id:hover {
    max-width: none;
    word-break: break-all;
    white-space: normal;
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

/* Form Styling */
.form-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
}

.form-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

.person-section {
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    animation: fadeIn 0.5s ease-out;
}

.person-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.victim-fields {
    border-top: 1px dashed var(--border);
    padding-top: 24px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* Multi-select Dropdown styling */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-display {
    min-height: 48px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

.multi-select-display:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.tag {
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: tagFadeIn 0.2s ease-out;
}

.tag-remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
}

.tag-remove:hover {
    opacity: 1;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #334155;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    animation: dropdownSlide 0.2s ease-out;
}

.dropdown-list.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: var(--text-main);
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary);
}

.dropdown-item.selected {
    background: #eef2ff;
    color: var(--primary);
    pointer-events: none;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 14px;
}

@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Adjustments for horizontal density */
.form-row.dense {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 1024px) {
    .person-section .form-row.dense {
        grid-template-columns: repeat(4, 1fr);
    }
}

.victim-fields .form-row.dense {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 1200px) {
    .victim-fields .form-row.dense {
        grid-template-columns: repeat(4, 1fr);
    }
}

.form-actions {
    margin-top: 32px;
    display: flex;
    justify-content: flex-end;
}

/* Animations & Loaders */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: rotate 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Actions Column Styling */
.action-btn-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.action-btn:hover {
    background: rgba(129, 140, 248, 0.15);
    color: var(--primary);
    border-color: rgba(129, 140, 248, 0.3);
    transform: translateY(-1px);
}

.action-btn.view-btn:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

/* View Screen Styling */
#view-record-view .form-content {
    max-width: 100% !important;
}

#view-record-view .form-card {
    max-width: 95%;
    margin: 0 auto;
    width: 100%;
}

.person-details-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 20px;
}

.view-person-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    animation: fadeIn 0.4s ease-out;
}

.view-person-card h4 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    font-size: 15px;
    color: var(--text-main);
}

.view-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.view-tag {
    background: rgba(129, 140, 248, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(129, 140, 248, 0.2);
}

/* View Header Polish */
#view-record-view .form-header {
    text-align: left;
    margin-bottom: 24px;
    padding: 0 5%;
}

#view-ref-display {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(129, 140, 248, 0.05);
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.1);
    letter-spacing: 0.02em;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    height: auto;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-main);
    border-color: var(--text-muted);
}

.view-only input:disabled,
.view-only select:disabled {
    opacity: 0.9;
    color: var(--text-main);
    background: rgba(30, 41, 59, 0.4);
    cursor: default;
}

.view-only .multi-select-display {
    cursor: default !important;
}

.view-only .tag {
    background: rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.4);
}

.view.hidden {
    display: none !important;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Log View Styles */
.log-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--glass-shadow);
}

.log-terminal {
    font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    padding-right: 10px;
}

.log-terminal::-webkit-scrollbar {
    width: 8px;
}

.log-terminal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.log-terminal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.log-line {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4px;
}

.log-timestamp {
    color: #64748b;
    margin-right: 12px;
    user-select: none;
    min-width: 200px;
    /* Fixed width for consistent alignment */
    flex-shrink: 0;
}

.log-message {
    color: #e2e8f0;
    flex-grow: 1;
}

/* Pagination Styling */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(51, 65, 85, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    background: rgba(129, 140, 248, 0.05);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 16px;
}
/* Tablet & Mobile Responsiveness Fixes */
@media (max-width: 1024px) {
    body {
        padding: 12px;
    }

    .navbar {
        padding: 12px 16px;
        margin-bottom: 24px;
    }

    .nav-title {
        font-size: 16px;
    }

    .nav-user {
        gap: 12px;
    }

    #role-badge {
        display: none; /* Hide badge on smaller screens to save space */
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nav-user {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--border);
        padding-top: 12px;
    }

    .dashboard-header {
        margin-bottom: 24px;
    }

    .header-main {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .grid-container {
        border-radius: 12px;
    }
}
