:root {
    /* Brand / accents - Modern color palette */
    --primary: #4f9d1c;
    --primary-dark: #3d7c15;
    --primary-light: #e8f4d9;
    --primary-lighter: #f3f9eb;

    /* High-contrast text used on highlights */
    --on-primary: #ffffff;

    --secondary: #64748b;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;

    /* Surfaces */
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --sidebar-bg: #3d6200;
    --sidebar-text: #e8f4b0;
    --white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Typography */
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    --card-shadow: var(--shadow-sm);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 260px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== DARK MODE ===== */
body.dark-mode,
html.dark-mode-pre body {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --white: #1e293b;
    --border: #334155;
    --border-light: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --primary-light: #1a3a0a;
    --primary-lighter: #142d08;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
}

body.dark-mode .topbar {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .form-control {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .form-control::placeholder {
    color: #64748b;
}

body.dark-mode thead th {
    background: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}

body.dark-mode tbody tr:hover {
    background: #263348;
}

body.dark-mode tbody td {
    border-bottom-color: #1e293b;
    color: #cbd5e1;
}

body.dark-mode .chart-card,
body.dark-mode .a-stat {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .upload-area {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .stat-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .btn-light {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

body.dark-mode select.form-control option {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode select.form-control {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

/* ===== DARK MODE - LANDING PAGE ===== */
body.dark-mode .landing-steps {
    background: #0f172a;
}

body.dark-mode .landing-steps .section-title,
body.dark-mode .landing-steps .steps-header h2 {
    color: #f1f5f9;
}

body.dark-mode .landing-steps .section-sub,
body.dark-mode .steps-label {
    color: #94a3b8;
}

body.dark-mode .step-body h3 {
    color: #f1f5f9;
}

body.dark-mode .step-body p {
    color: #94a3b8;
}

body.dark-mode .step-chips span {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

body.dark-mode .steps-line {
    background: #334155;
}

body.dark-mode .landing-features {
    background: #1e293b;
}

body.dark-mode .landing-features .section-title {
    color: #f1f5f9;
}

body.dark-mode .landing-features .section-sub {
    color: #94a3b8;
}

body.dark-mode .feature-card {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .feature-card:hover {
    border-color: #4f9d1c;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

body.dark-mode .feature-card h3 {
    color: #f1f5f9;
}

body.dark-mode .feature-card p {
    color: #94a3b8;
}

/* ===== DARK MODE - REPORT FORM ===== */
body.dark-mode .rf-form-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .rf-tips {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .rf-tip strong {
    color: #f1f5f9;
}

body.dark-mode .rf-tip small {
    color: #94a3b8;
}

body.dark-mode .rf-info-lost {
    background: linear-gradient(135deg, #2d1515, #3d1a1a);
    border-color: #7f1d1d;
}

body.dark-mode .rf-info-found {
    background: linear-gradient(135deg, #0d2d1a, #0f3d22);
    border-color: #065f46;
}

body.dark-mode .rf-info-card h3 {
    color: #f1f5f9;
}

body.dark-mode .rf-info-card p {
    color: #94a3b8;
}

body.dark-mode .rf-form-header--lost {
    background: linear-gradient(135deg, #2d1515 0%, #1e293b 60%);
}

body.dark-mode .rf-form-header--found {
    background: linear-gradient(135deg, #0d2d1a 0%, #1e293b 60%);
}

body.dark-mode .rf-form-header h2 {
    color: #f1f5f9;
}

body.dark-mode .rf-form-header p {
    color: #94a3b8;
}

body.dark-mode .rf-form-header-icon {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .rf-section-label {
    color: #64748b;
    border-bottom-color: #334155;
}

body.dark-mode .rf-upload-zone {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .rf-upload-zone:hover {
    border-color: var(--primary);
    background: #1a3a0a;
}

body.dark-mode .rf-upload-text {
    color: #cbd5e1;
}

body.dark-mode .rf-upload-hint {
    color: #64748b;
}

body.dark-mode .rf-preview-wrap {
    border-color: #334155;
}

body.dark-mode .rf-notice {
    background: #1a3a0a;
    border-color: #2d5a10;
    border-left-color: var(--primary);
    color: #bef264;
}

body.dark-mode .rf-form-actions {
    border-top-color: #334155;
}

/* ===== DARK MODE - STEP BODY (How It Works) ===== */
body.dark-mode .step-body {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .step-body h3 {
    color: #f1f5f9;
}

body.dark-mode .step-body p {
    color: #94a3b8;
}

body.dark-mode .step-tag {
    background: #1a3a0a;
    color: #a3e635;
}

body.dark-mode .step-tag--blue {
    background: #0c2340;
    color: #7dd3fc;
}

body.dark-mode .step-tag--orange {
    background: #2d1a00;
    color: #fbbf24;
}

body.dark-mode .step-tag--green {
    background: #0d2d1a;
    color: #6ee7b7;
}

body.dark-mode .step-chips span {
    background: #1a3a0a;
    color: #a3e635;
}

body.dark-mode .step-chips--blue span {
    background: #0c2340;
    color: #7dd3fc;
}

body.dark-mode .step-chips--orange span {
    background: #2d1a00;
    color: #fbbf24;
}

body.dark-mode .step-chips--green span {
    background: #0d2d1a;
    color: #6ee7b7;
}

body.dark-mode .step-bubble-num {
    background: #1e293b;
    color: #f1f5f9;
}

/* ===== DARK MODE - FEATURE CARDS ===== */
body.dark-mode .feature-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .feature-card h3 {
    color: #f1f5f9;
}

body.dark-mode .feature-card p {
    color: #94a3b8;
}

/* ===== DARK MODE - LANDING STEPS SECTION ===== */
body.dark-mode .landing-steps {
    background: #0f172a;
}

body.dark-mode .landing-features {
    background: #1e293b;
}

body.dark-mode .section-title {
    color: #f1f5f9;
}

body.dark-mode .section-sub {
    color: #94a3b8;
}

body.dark-mode .steps-label {
    background: #1a3a0a;
    color: #a3e635;
}

/* ===== DARK MODE - ALERTS ===== */
body.dark-mode .alert-success {
    background: #0d2d1a;
    color: #6ee7b7;
    border-left-color: #059669;
}

body.dark-mode .alert-danger {
    background: #2d1515;
    color: #fca5a5;
    border-left-color: #dc2626;
}

body.dark-mode .alert-info {
    background: #0c2340;
    color: #7dd3fc;
    border-left-color: #0891b2;
}

body.dark-mode .alert-warning {
    background: #2d1a00;
    color: #fcd34d;
    border-left-color: #d97706;
}

/* ===== DARK MODE - NOTIF ITEM ===== */
body.dark-mode .notif-item.unread {
    background: #0d2d1a;
}

/* ===== DARK MODE - PAGE CONTENT ===== */
body.dark-mode .page-content {
    background: #0f172a;
}

body.dark-mode tbody tr:hover {
    background: #263348;
}



/* ===== BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== ACCESSIBILITY: FOCUS RINGS (Keyboard) ===== */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 157, 28, 0.25);
    border-color: var(--primary) !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
}

input,
select,
textarea {
    font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 600;
}

/* ===== AUTH ===== */

/* ===== TOPBAR / AUTH INLINE-STYLE REMOVAL HELPERS ===== */
.topbar-userlink {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.topbar-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.topbar-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
}

.auth-bg {
    /* keeps original background feel from inline styles */
    background: url('../../cyn.png') center/cover no-repeat fixed;
}

.auth-logo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.auth-logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
}

.auth-logo-title {
    margin: 0;
    color: #ffffff;
}

.auth-logo-sub {
    margin: 0;
    font-size: 12px;
}

.auth-logo-sub2 {
    margin: 0;
    font-size: 11px;
    color: #ffffff;
}


.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../../cyn.png') center/cover no-repeat fixed;
    padding: 16px;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.auth-wrapper>* {
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;
    padding: 48px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    animation: fadeInUp 0.8s ease-out;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo h1 {
    font-size: 32px;
    color: #d4f06a;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.auth-logo p {
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    letter-spacing: 0.5px;
}

.auth-card h2 {
    font-size: 22px;
    margin-bottom: 28px;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.auth-card .form-group label {
    color: rgba(255, 255, 255, .9);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-card .form-control {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .7);
    color: #fff;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, .5);
}

.auth-card .form-control:focus {
    background: rgba(255, 255, 255, .22);
    border-color: #d4f06a;
    box-shadow: 0 0 0 3px rgba(212, 240, 106, .2);
}

.auth-card select.form-control option {
    background: #2d3d00;
    color: #fff;
}

.auth-card p {
    color: rgba(255, 255, 255, .75);
}

.auth-card p a {
    color: #d4f06a !important;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 157, 28, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(79, 157, 28, 0.15);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(79, 157, 28, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(79, 157, 28, 0.15);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.15);
}

.btn-success:hover {
    background: #047857;
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.15);
}

.btn-warning:hover {
    background: #b45309;
    box-shadow: 0 4px 8px rgba(217, 119, 6, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.15);
}

.btn-secondary:hover {
    background: #475569;
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.25);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-lighter);
    border-color: var(--primary-dark);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    transition: all 0.2s ease;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--info);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(8, 145, 178, 0.15);
}

.btn-info:hover {
    background: #0e7490;
    box-shadow: 0 4px 8px rgba(8, 145, 178, 0.25);
    transform: translateY(-1px);
}

.btn-light {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-light:hover {
    background: var(--border);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    display: block;
}

.auth-card .btn-block {
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    margin-top: 12px;
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1c3d00 0%, #2a5500 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 300;
    transition: transform .3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .1) transparent;
    box-shadow: 4px 0 20px rgba(0, 0, 0, .15);
}

.sidebar::-webkit-scrollbar {
    width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 3px;
}

/* Logo */
.sidebar-logo {
    padding: 24px 18px 22px;
    border-bottom: none;
    flex-shrink: 0;
    background: rgba(0, 0, 0, .2);
    position: relative;
}

.sidebar-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4f06a, #5a8a00, transparent);
    opacity: .6;
}

.sidebar-logo-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.sidebar-logo-inner img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(212, 240, 106, .35));
    transition: transform .3s ease;
}

.sidebar-logo-inner img:hover {
    transform: rotate(-5deg) scale(1.05);
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 800;
    color: #d4f06a;
    letter-spacing: 1.5px;
    display: block;
    line-height: 1.1;
    text-align: left;
    text-shadow: 0 0 18px rgba(212, 240, 106, .35);
}

.sidebar-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, .6);
    letter-spacing: .4px;
    display: block;
    text-align: left;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 3px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 10px 0 6px;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 16px 5px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, .55);
    font-weight: 700;
}

.nav-section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .08);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px 9px 12px;
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    font-weight: 500;
    transition: all .2s ease;
    cursor: pointer;
    text-decoration: none;
    margin: 2px 8px;
    border-radius: 10px;
    border-left: 2px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(212, 240, 106, .08);
    color: #fff;
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(212, 240, 106, .18), rgba(90, 138, 0, .12));
    color: #e8f9a0;
    font-weight: 600;
    border-left-color: #d4f06a;
    margin-left: 0;
    border-radius: 0 10px 10px 0;
    padding-left: 20px;
    box-shadow: inset 0 0 20px rgba(212, 240, 106, .05);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: #d4f06a;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px rgba(212, 240, 106, .6);
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .06);
    transition: all .2s ease;
    position: relative;
}

.nav-item:hover .nav-icon {
    background: rgba(212, 240, 106, .15);
    transform: scale(1.1);
}

.nav-item.active .nav-icon {
    background: rgba(212, 240, 106, .2);
    box-shadow: 0 0 10px rgba(212, 240, 106, .2);
}

.nav-label {
    flex: 1;
}

.nav-badge {
    font-size: 10px;
    font-weight: 700;
    background: #ef4444;
    color: #fff;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.6;
    box-shadow: 0 0 8px rgba(239, 68, 68, .5);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(239, 68, 68, .5);
    }

    50% {
        box-shadow: 0 0 12px rgba(239, 68, 68, .8);
    }
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
    margin: 8px 14px;
}

/* Footer */
.sidebar-footer {
    padding: 12px;
    border-top: none;
    flex-shrink: 0;
    background: rgba(0, 0, 0, .2);
    position: relative;
}

.sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 240, 106, .3), transparent);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: all .2s ease;
    text-decoration: none;
}

.sidebar-profile:hover {
    background: rgba(212, 240, 106, .08);
    border-color: rgba(212, 240, 106, .2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5a8a00, #d4f06a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #1c3d00;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(212, 240, 106, .4);
    box-shadow: 0 0 10px rgba(212, 240, 106, .2);
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-profile-role {
    font-size: 10px;
    color: rgba(212, 240, 106, .5);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(220, 38, 38, .15), rgba(239, 68, 68, .08));
    border: 1px solid rgba(239, 68, 68, .25);
    font-size: 13px;
    font-weight: 600;
    color: #fca5a5;
    text-decoration: none;
    letter-spacing: .4px;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-logout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, .3), rgba(239, 68, 68, .2));
    opacity: 0;
    transition: opacity .25s ease;
}

.sidebar-logout:hover {
    color: #fff;
    border-color: rgba(239, 68, 68, .5);
    box-shadow: 0 4px 16px rgba(220, 38, 38, .25);
    transform: translateY(-1px);
}

.sidebar-logout:hover::before {
    opacity: 1;
}

.sidebar-logout svg {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform .25s ease;
}

.sidebar-logout:hover svg {
    transform: translateX(3px);
}

.sidebar-logout span,
.sidebar-logout svg~* {
    position: relative;
    z-index: 1;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 299;
}

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

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ===== TOPBAR ===== */
.topbar {
    background: var(--white);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
    padding: 6px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}

.menu-btn:hover {
    color: var(--primary);
}

.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    padding: 6px;
    line-height: 1;
    transition: color 0.2s ease;
}

.notif-btn:hover {
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.topbar-user {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-btn {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--border);
    transform: rotate(20deg) scale(1.1);
}

/* ===== PAGE CONTENT ===== */
.page-content {
    padding: 24px;
    flex: 1;
    background: var(--bg);
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: #eff6ff;
    color: #0369a1;
}

.stat-icon.green {
    background: #ecfdf5;
    color: #059669;
}

.stat-icon.yellow {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-icon.lime {
    background: #ecfccb;
    color: #3d6200;
}

.stat-info .value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-info .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== TABLE ===== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

thead th {
    background: var(--bg-secondary);
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    vertical-align: middle;
    color: var(--text-secondary);
}

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

tbody tr:hover {
    background: #f9fafb;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-pending {
    background: #fef3c7;
    color: #78350f;
}

.badge-matched {
    background: #eff6ff;
    color: #0369a1;
}

.badge-returned {
    background: #ecfdf5;
    color: #065f46;
}

.badge-closed {
    background: #f3f4f6;
    color: #374151;
}

.badge-approved {
    background: #ecfdf5;
    color: #059669;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-unread {
    background: #fee2e2;
    color: #991b1b;
}

.badge-read {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-sent {
    background: #ecfdf5;
    color: #065f46;
}

.badge-failed {
    background: #fee2e2;
    color: #991b1b;
}

.badge-admin {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-user {
    background: #eff6ff;
    color: #1e40af;
}

.badge-active {
    background: #ecfdf5;
    color: #059669;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: #059669;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #dc2626;
}

.alert-info {
    background: #ecf9ff;
    color: #0369a1;
    border-left-color: #0891b2;
}

.alert-warning {
    background: #fffbeb;
    color: #78350f;
    border-left-color: #d97706;
}

/* ===== UTILITIES ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-16 {
    margin-top: 16px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-16 {
    gap: 16px;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar .form-control {
    flex: 1;
    min-width: 180px;
}

/* ===== IMAGE PREVIEW ===== */
.img-preview {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.img-thumb {
    max-width: 100%;
    max-height: 220px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.page-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 400;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text);
}

/* ===== CHART ===== */
.chart-container {
    position: relative;
    height: 260px;
}

/* ===== LANDING PAGE ===== */
.landing {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 0;
}

.landing>* {
    position: relative;
    z-index: 1;
}

/* NAV */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(212, 240, 106, 0.3));
    transition: transform 0.2s ease;
}

.landing-brand {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #d4f06a;
    letter-spacing: 1px;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(212, 240, 106, 0.2);
}

.landing-brand-sub {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.3px;
    margin-top: 2px;
    font-weight: 500;
}

.landing-nav .nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.landing-nav .nav-links .btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.landing-nav .nav-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* HERO */
.landing-hero {
    text-align: center;
    padding: 90px 24px 70px;
    color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 240, 106, 0.12);
    border: 1px solid rgba(212, 240, 106, 0.3);
    color: #d4f06a;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}

.landing-hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -1px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero-accent {
    color: #d4f06a;
    text-shadow: 0 0 30px rgba(212, 240, 106, 0.4);
}

.landing-hero>p {
    font-size: 17px;
    color: rgba(255, 255, 255, .82);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

.hero-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
    width: 100%;
    max-width: 600px;
}

.hero-btns .btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

/* HERO STATS */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stat {
    text-align: center;
    padding: 0 32px;
}

.hero-stat-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.hero-stat-num {
    font-size: 36px;
    font-weight: 800;
    color: #d4f06a;
    line-height: 1;
}

.hero-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.hero-scroll-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    padding: 16px;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 0;
    margin-bottom: 48px;
}

.landing-steps {
    background: var(--bg);
    padding: 80px 48px;
    overflow: hidden;
}

.steps-header {
    text-align: center;
    margin-bottom: 56px;
}

.steps-label {
    display: inline-block;
    background: var(--primary-light);
    color: #2d5200;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.steps-header .section-title {
    margin-bottom: 8px;
}

.steps-header .section-sub {
    margin-bottom: 0;
}

.steps-timeline {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.steps-line {
    position: absolute;
    left: 50%;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, #d4f06a 50%, var(--primary) 100%);
    transform: translateX(-50%);
    opacity: 0.25;
    z-index: 0;
}

.step-item {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.step-item:last-child {
    margin-bottom: 0;
}

/* odd steps: body left, bubble center */
.step-item .step-bubble {
    grid-column: 2;
    grid-row: 1;
}

.step-item .step-body {
    grid-column: 3;
    grid-row: 1;
    padding-left: 28px;
}

/* even steps: bubble center, body right (alt = body on left) */
.step-item--alt .step-bubble {
    grid-column: 2;
    grid-row: 1;
}

.step-item--alt .step-body {
    grid-column: 1;
    grid-row: 1;
    padding-left: 0;
    padding-right: 28px;
    text-align: right;
}

.step-bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.step-bubble:hover {
    transform: scale(1.08);
}

.step-bubble--1 {
    background: linear-gradient(135deg, #4f9d1c, #7dc43a);
}

.step-bubble--2 {
    background: linear-gradient(135deg, #0891b2, #38bdf8);
}

.step-bubble--3 {
    background: linear-gradient(135deg, #d97706, #fbbf24);
}

.step-bubble--4 {
    background: linear-gradient(135deg, #059669, #34d399);
}

.step-bubble-icon {
    font-size: 24px;
    line-height: 1;
}

.step-bubble-num {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.step-body {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.step-body:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.step-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    background: var(--primary-light);
    color: #2d5200;
}

.step-tag--blue {
    background: #eff6ff;
    color: #0369a1;
}

.step-tag--orange {
    background: #fff7ed;
    color: #c2410c;
}

.step-tag--green {
    background: #ecfdf5;
    color: #065f46;
}

.step-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.step-body p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 12px;
}

.step-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.step-item--alt .step-chips {
    justify-content: flex-end;
}

.step-chips span {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--primary-light);
    color: #2d5200;
}

.step-chips--blue span {
    background: #eff6ff;
    color: #0369a1;
}

.step-chips--orange span {
    background: #fff7ed;
    color: #c2410c;
}

.step-chips--green span {
    background: #ecfdf5;
    color: #065f46;
}

/* FEATURES */
.landing-features {
    background: var(--white);
    padding: 72px 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-4px);
}

.feature-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.feature-icon-wrap.green {
    background: #ecfdf5;
}

.feature-icon-wrap.blue {
    background: #eff6ff;
}

.feature-icon-wrap.orange {
    background: #fff7ed;
}

.feature-icon-wrap.purple {
    background: #f3e8ff;
}

.feature-icon-wrap.red {
    background: #fef2f2;
}

.feature-icon-wrap.teal {
    background: #f0fdfa;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA BANNER */
.landing-cta {
    background: linear-gradient(135deg, #1a4d00 0%, #3d7c15 50%, #2a5500 100%);
    padding: 72px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.landing-cta h2 {
    font-size: 36px;
    font-weight: 800;
    color: #d4f06a;
    margin-bottom: 12px;
}

.landing-cta p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 32px;
}

/* FOOTER */
.landing-footer {
    background: #050a00;
    padding: 32px 48px 20px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    opacity: 0.8;
}

.footer-brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #d4f06a;
}

.footer-brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #d4f06a;
}

.footer-copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

/* ===== REPORT FORM (rf) ===== */
.rf-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    max-width: 1000px;
    align-items: start;
}

/* Sidebar */
.rf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 80px;
}

.rf-info-card {
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.rf-info-lost {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
}

.rf-info-found {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
}

.rf-info-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.rf-info-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.rf-info-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.rf-tips {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rf-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rf-tip-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.rf-tip strong {
    font-size: 13px;
    color: var(--text);
    display: block;
    line-height: 1.3;
}

.rf-tip small {
    font-size: 11px;
    color: var(--text-muted);
}

/* Form Card */
.rf-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.rf-form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.rf-form-header--lost {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 60%);
}

.rf-form-header--found {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%);
}

.rf-form-header-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.rf-form-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.rf-form-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.rf-form {
    padding: 28px;
}

.rf-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.rf-required {
    color: #ef4444;
    font-weight: 700;
}

.rf-optional {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.rf-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 157, 28, 0.1);
}

.rf-input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.rf-input-prefix {
    position: absolute;
    left: 12px;
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.rf-input--prefixed {
    padding-left: 38px;
}

/* Upload Zone */
.rf-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}

.rf-upload-zone:hover,
.rf-upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.rf-upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.rf-upload-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.rf-upload-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* Preview */
.rf-preview-wrap {
    margin-top: 10px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.rf-preview-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.rf-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.rf-preview-remove:hover {
    background: rgba(220, 38, 38, 0.85);
}

/* Notice */
.rf-notice {
    background: var(--primary-light);
    border: 1px solid var(--primary-lighter);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    color: #2d5200;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Actions */
.rf-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.rf-submit-btn {
    min-width: 200px;
}

/* Responsive */
@media (max-width: 900px) {
    .rf-wrapper {
        grid-template-columns: 1fr;
    }

    .rf-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .rf-sidebar {
        grid-template-columns: 1fr;
    }

    .rf-form {
        padding: 18px;
    }

    .rf-form-header {
        padding: 18px;
    }

    .rf-form-actions {
        flex-direction: column;
    }

    .rf-submit-btn {
        width: 100%;
    }
}

.match-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
    margin-bottom: 14px;
    background: var(--white);
    transition: var(--transition);
}

.match-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.match-score {
    text-align: center;
    min-width: 100px;
}

.match-score .score {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.match-score .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.match-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.match-item p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

/* ===== NOTIFICATION ITEM ===== */
.notif-item {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: var(--transition);
}

.notif-item:hover {
    background: var(--bg-secondary);
}

.notif-item.unread {
    background: #f0fdf4;
    border-left: 3px solid var(--primary);
    padding-left: 15px;
}

.notif-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notif-content .msg {
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
    color: var(--text-secondary);
}

.notif-content .time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.upload-area .icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.upload-area p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ===== ITEM DETAIL ===== */
.item-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.item-image-box {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
}

.item-image-box img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.item-image-placeholder {
    width: 100%;
    height: 240px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}

.detail-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    min-width: 110px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-value {
    color: var(--text-secondary);
}

/* ===== CHART ===== */
.chart-container {
    position: relative;
    height: 280px;
}

/* ===== ANALYTICS ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ===================================================
   RESPONSIVE BREAKPOINTS
   =================================================== */

/* ===== TABLET (max 1024px) ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .chart-container {
        height: 240px;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .landing-nav {
        padding: 16px 24px;
        gap: 16px;
    }

    .landing-nav .nav-links {
        flex-wrap: wrap;
        gap: 10px;
    }

    .landing-nav .nav-links .btn {
        padding: 10px 14px;
        font-size: 12px;
        font-weight: 600;
    }

    .landing-hero {
        padding: 70px 24px 56px;
    }

    .landing-hero h1 {
        font-size: 44px;
    }

    .landing-features,
    .landing-steps,
    .landing-cta {
        padding: 56px 28px;
    }

    .landing-cta h2 {
        font-size: 32px;
    }

    .landing-cta p {
        font-size: 15px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 0;
        padding: 18px 30px;
    }

    .hero-stat {
        padding: 0 24px;
    }

    .hero-stat-num {
        font-size: 32px;
    }

    .landing-footer {
        padding: 28px 28px 16px;
    }

    .step-item {
        grid-template-columns: 60px 1fr;
    }

    .step-item .step-bubble,
    .step-item--alt .step-bubble {
        grid-column: 1;
        grid-row: 1;
        width: 56px;
        height: 56px;
    }

    .step-item .step-body,
    .step-item--alt .step-body {
        grid-column: 2;
        grid-row: 1;
        padding-left: 16px;
        padding-right: 0;
        text-align: left;
    }

    .step-item--alt .step-chips {
        justify-content: flex-start;
    }

    .steps-line {
        left: 28px;
    }
}

/* ===== TABLET (max 768px) ===== */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    /* Improve button touch targets for mobile */
    .btn {
        min-height: 44px;
    }

    .btn-lg {
        min-height: 48px;
    }

    /* Sidebar hidden off-screen on mobile */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

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

    .menu-btn {
        display: block;
    }

    /* Topbar */
    .topbar {
        padding: 12px 16px;
    }

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

    .topbar-user span {
        display: none;
    }

    /* Page content */
    .page-content {
        padding: 16px;
    }

    /* Grids stack */
    .grid-2,
    .grid-3,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    /* Stat cards 2 columns */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 19px;
    }

    .stat-info .value {
        font-size: 22px;
    }

    .stat-info .label {
        font-size: 11px;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .auth-card {
        padding: 36px 28px;
        max-width: 540px !important;
    }

    .auth-card h2 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    /* Match card stacks */
    .match-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .match-score {
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 12px 0;
        min-width: auto;
    }

    /* Item detail stacks */
    .item-detail {
        grid-template-columns: 1fr;
    }

    .item-image-box img {
        height: 200px;
    }

    .item-image-placeholder {
        height: 200px;
    }

    /* Landing */
    .landing-hero h1 {
        font-size: 34px;
        margin-bottom: 14px;
    }

    .landing-hero>p {
        font-size: 15px;
        margin-bottom: 24px;
        max-width: 100%;
    }

    .landing-nav {
        padding: 16px 14px;
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }

    .landing-logo {
        gap: 10px;
    }

    .landing-logo-img {
        width: 40px;
        height: 40px;
    }

    .landing-brand {
        font-size: 18px;
    }

    .landing-brand-sub {
        font-size: 10px;
    }

    .landing-nav .nav-links {
        width: auto;
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .landing-nav .nav-links .btn {
        width: auto;
        padding: 9px 12px;
        font-size: 11px;
        font-weight: 600;
    }

    .landing-brand {
        font-size: 18px;
    }

    .landing-features,
    .landing-steps {
        padding: 40px 20px;
    }

    .landing-cta {
        padding: 40px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 20px 16px;
    }

    .landing-footer {
        padding: 24px 20px 14px;
    }

    .hero-btns {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-btns .btn-lg {
        width: 100%;
        padding: 13px 24px;
        font-size: 14px;
    }

    .step-item {
        grid-template-columns: 52px 1fr;
        margin-bottom: 28px;
    }

    .step-item .step-bubble,
    .step-item--alt .step-bubble {
        grid-column: 1;
        grid-row: 1;
        width: 52px;
        height: 52px;
    }

    .step-bubble-icon {
        font-size: 20px;
    }

    .step-item .step-body,
    .step-item--alt .step-body {
        grid-column: 2;
        grid-row: 1;
        padding-left: 14px;
        padding-right: 0;
        text-align: left;
    }

    .step-item--alt .step-chips {
        justify-content: flex-start;
    }

    .steps-line {
        left: 26px;
    }

    .steps-timeline {
        max-width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .hero-stats {
        padding: 16px 20px;
        gap: 0;
    }

    .hero-stat {
        padding: 0 16px;
    }

    .hero-stat-num {
        font-size: 28px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .landing-cta h2 {
        font-size: 28px;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .landing-cta p {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.5;
    }

    .landing-cta .hero-btns {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .landing-cta .hero-btns .btn-lg {
        width: 100%;
        padding: 13px 24px;
        font-size: 14px;
        justify-content: center;
    }

    /* Card header wraps */
    .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 16px;
    }

    /* Search bar */
    .search-bar {
        gap: 8px;
    }

    .search-bar .form-control {
        min-width: 140px;
    }

    /* Table sizing */
    tbody td {
        padding: 11px 12px;
        font-size: 13px;
    }

    thead th {
        padding: 10px 12px;
        font-size: 11px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }

    .modal {
        padding: 20px;
    }

    .modal-header {
        margin-bottom: 18px;
    }

    .modal-header h3 {
        font-size: 15px;
    }
}

/* ===== MOBILE (max 480px) ===== */
@media (max-width: 480px) {
    :root {
        --sidebar-width: 100%;
    }

    /* Better touch targets for mobile buttons */
    .btn {
        min-height: 44px;
        padding: 11px 16px;
    }

    .btn-lg {
        min-height: 48px;
        padding: 14px 18px;
    }

    .btn-sm {
        min-height: 40px;
        padding: 8px 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 8px;
    }

    .stat-info .value {
        font-size: 20px;
    }

    .stat-info .label {
        font-size: 10px;
        margin-top: 2px;
    }

    .btn {
        padding: 9px 14px;
        font-size: 13px;
        gap: 6px;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }

    .page-content {
        padding: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-header {
        padding: 12px;
    }

    .landing-hero {
        padding: 48px 16px 36px;
    }

    .landing-hero h1 {
        font-size: 28px;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .hero-badge {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    .landing-hero>p {
        font-size: 15px;
        margin-bottom: 20px;
        line-height: 1.5;
    }

    .hero-btns {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero-btns .btn {
        padding: 11px 18px;
        font-size: 13px;
        width: 100%;
        min-width: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-btns .btn-lg {
        padding: 12px 16px;
        font-size: 13px;
        width: 100%;
    }

    .landing-cta {
        padding: 40px 18px;
    }

    .landing-cta h2 {
        font-size: 26px;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .landing-cta p {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.5;
    }

    .landing-cta .hero-btns {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .landing-cta .hero-btns .btn-lg {
        width: 100%;
        padding: 12px 16px;
        font-size: 13px;
        justify-content: center;
    }
}

.hero-stats {
    padding: 14px 12px;
}

.hero-stat {
    padding: 0 10px;
}

.hero-stat-num {
    font-size: 22px;
}

.hero-stat-divider {
    height: 36px;
}

.features-grid {
    grid-template-columns: 1fr;
}

.landing-features,
.landing-steps,
.landing-cta {
    padding: 36px 16px;
}

.landing-footer {
    padding: 20px 16px 12px;
}

.step-item {
    grid-template-columns: 48px 1fr;
    margin-bottom: 24px;
}

.step-item .step-bubble,
.step-item--alt .step-bubble {
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
}

.step-bubble-icon {
    font-size: 18px;
}

.step-item .step-body,
.step-item--alt .step-body {
    grid-column: 2;
    grid-row: 1;
    padding-left: 12px;
    padding-right: 0;
    text-align: left;
}

.step-item--alt .step-chips {
    justify-content: flex-start;
}

.steps-line {
    left: 24px;
}

.modal {
    padding: 16px;
}

.modal-header {
    margin-bottom: 14px;
}

.modal-header h3 {
    font-size: 14px;
}

.auth-card {
    padding: 28px 18px;
    max-width: 100%;
}

.auth-logo h1 {
    font-size: 24px;
}

.img-preview {
    width: 44px;
    height: 44px;
}

table {
    min-width: 100%;
}

tbody td {
    padding: 10px;
    font-size: 12px;
}

thead th {
    padding: 8px 10px;
    font-size: 10px;
}

.detail-row {
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    min-width: auto;
}

.pagination {
    gap: 4px;
}

.page-btn {
    padding: 6px 10px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    margin-bottom: 6px;
    font-size: 13px;
}

.form-control {
    padding: 10px 12px;
    font-size: 13px;
}

.upload-area {
    padding: 20px 12px;
}

.upload-area .icon {
    font-size: 32px;
}

.notif-item {
    padding: 12px 14px;
    gap: 10px;
}

.notif-content .msg {
    font-size: 13px;
}

.notif-content .time {
    font-size: 11px;
}

.landing-nav {
    padding: 12px 14px;
}

.landing-nav .logo {
    font-size: 19px;
}

.landing-features {
    padding: 28px 14px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 24px;
}

.feature-card {
    padding: 18px 12px;
}

.feature-card .icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 14px;
}

.feature-card p {
    font-size: 12px;
}

.chart-container {
    height: 200px;
}

/* Hide less important table columns on very small screens */
.hide-xs {
    display: none !important;
}

/* ===== SMALL MOBILE (max 360px) ===== */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero h1 {
        font-size: 22px;
    }

    .topbar-title {
        font-size: 13px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .landing-hero {
        padding: 40px 12px 30px;
    }

    .landing-hero h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .landing-hero>p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .hero-badge {
        font-size: 10px;
        padding: 4px 12px;
        margin-bottom: 12px;
    }

    .landing-nav {
        padding: 12px 10px;
        flex-wrap: nowrap;
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
    }

    .landing-logo {
        gap: 8px;
        flex-shrink: 0;
    }

    .landing-logo-img {
        width: 36px;
        height: 36px;
    }

    .landing-brand {
        font-size: 16px;
    }

    .landing-brand-sub {
        font-size: 9px;
    }

    .landing-nav .nav-links {
        width: auto;
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .landing-nav .nav-links .btn {
        width: auto;
        padding: 7px 10px;
        font-size: 10px;
        font-weight: 600;
        border-radius: 6px;
    }

    .landing-brand {
        font-size: 16px;
    }

    .landing-brand-sub {
        font-size: 9px;
    }

    .nav-links {
        gap: 6px !important;
    }

    .nav-links .btn {
        padding: 6px 10px;
        font-size: 10px;
    }

    .landing-cta {
        padding: 32px 12px;
    }

    .landing-cta h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .landing-cta p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .landing-cta .hero-btns {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .landing-cta .hero-btns .btn-lg {
        width: 100%;
        padding: 10px 14px;
        font-size: 12px;
        justify-content: center;
    }

    .cta-inner {
        max-width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .hero-btns .btn,
    .hero-btns .btn-lg {
        width: 100%;
        justify-content: center;
        padding: 10px 12px;
        font-size: 12px;
    }

    .auth-card {
        padding: 20px 14px;
        max-width: 100%;
    }

    .auth-logo h1 {
        font-size: 20px;
    }

    .auth-card h2 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
}

.hero-stats {
    flex-direction: column;
    gap: 12px;
}

.hero-stat-divider {
    display: none;
}

.section-title {
    font-size: 18px;
}

.feature-card {
    padding: 12px 10px;
}

.feature-card h3 {
    font-size: 12px;
}

.feature-card p {
    font-size: 11px;
}


/* ===================================================
   LANDING PAGE - FULL STYLES
   =================================================== */

/* NAV */
.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.landing-brand {
    font-size: 22px;
    font-weight: 900;
    color: #d4f06a;
    letter-spacing: 1.5px;
    display: block;
    line-height: 1.1;
}

.landing-brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    display: block;
}

/* HERO extras */
.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .15);
    color: #d4f06a;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 240, 106, .3);
}

.hero-accent {
    color: #d4f06a;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    padding: 12px 28px;
}

.hero-stat-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.hero-stat-num {
    font-size: 30px;
    font-weight: 900;
    color: #d4f06a;
    line-height: 1;
}

.hero-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.hero-stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, .2);
}

.hero-scroll-hint {
    text-align: center;
    color: rgba(255, 255, 255, .4);
    font-size: 13px;
    padding: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(6px)
    }
}

/* ── HOW IT WORKS ── */
.landing-steps {
    background: #f8fafc;
    padding: 80px 24px;
}

.steps-header {
    text-align: center;
    margin-bottom: 60px;
}

.steps-label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.steps-timeline {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.steps-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), #84cc16);
    transform: translateX(-50%);
    opacity: .25;
}

.step-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
}

.step-item--alt {
    direction: rtl;
}

.step-item--alt .step-body {
    direction: ltr;
}

.step-item--alt .step-chips {
    direction: ltr;
}

.step-bubble {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.step-bubble-icon {
    font-size: 20px;
    line-height: 1;
}

.step-bubble-num {
    font-size: 10px;
    font-weight: 900;
    opacity: .7;
}

.step-bubble--1 {
    background: linear-gradient(135deg, #4f9d1c, #84cc16);
}

.step-bubble--2 {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.step-bubble--3 {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.step-bubble--4 {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.step-body {
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    transition: transform .2s, box-shadow .2s;
}

.step-body:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.step-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.step-tag--blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.step-tag--orange {
    background: #ffedd5;
    color: #c2410c;
}

.step-tag--green {
    background: #d1fae5;
    color: #065f46;
}

.step-body h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.step-body p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.step-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.step-chips span {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.step-chips--blue span {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.step-chips--orange span {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.step-chips--green span {
    background: #f0fdf4;
    color: #065f46;
    border-color: #bbf7d0;
}

/* ── KEY FEATURES ── */
.landing-features {
    background: #fff;
    padding: 80px 24px;
}

.landing-features .section-title {
    text-align: center;
    margin-bottom: 10px;
}

.landing-features .section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    transition: all .25s ease;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
    border-color: var(--primary-light);
}

.feature-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.feature-icon-wrap.green {
    background: #d1fae5;
}

.feature-icon-wrap.blue {
    background: #dbeafe;
}

.feature-icon-wrap.orange {
    background: #ffedd5;
}

.feature-icon-wrap.purple {
    background: #ede9fe;
}

.feature-icon-wrap.red {
    background: #fee2e2;
}

.feature-icon-wrap.teal {
    background: #ccfbf1;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── CTA BANNER ── */
.landing-cta {
    background: linear-gradient(135deg, #1a4d00 0%, #3d7c15 50%, #2a5500 100%);
    padding: 72px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.cta-inner {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-inner h2 {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}

.cta-inner p {
    font-size: 16px;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 32px;
}

/* ── FOOTER ── */
.landing-footer {
    background: #0f1a00;
    padding: 32px 24px 20px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    opacity: .7;
}

.footer-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #d4f06a;
}

.footer-brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    margin-top: 2px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: #d4f06a;
}

.footer-copy {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, .25);
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-top: 16px;
}

/* ── SECTION SHARED ── */
.section-title {
    font-size: 30px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 10px;
}

.section-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media(max-width:768px) {
    .steps-line {
        display: none;
    }

    .step-item {
        grid-template-columns: auto 1fr;
    }

    .step-item--alt {
        direction: ltr;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .landing-steps,
    .landing-features {
        padding: 52px 16px;
    }

    .section-title {
        font-size: 24px;
    }
}

@media(max-width:480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .step-item {
        grid-template-columns: auto 1fr;
        gap: 16px;
    }

    .hero-stat-divider {
        display: none;
    }

    .hero-stat {
        padding: 10px 16px;
    }
}

/* ── DARK MODE: HOW IT WORKS ── */
body.dark-mode .landing-steps {
    background: #0f172a;
}

body.dark-mode .steps-label {
    background: rgba(79, 157, 28, .2);
    color: #84cc16;
}

body.dark-mode .step-body {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .step-body h3 {
    color: #f1f5f9;
}

body.dark-mode .step-body p {
    color: #94a3b8;
}

body.dark-mode .step-chips span {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}

body.dark-mode .step-chips--blue span {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1e40af;
}

body.dark-mode .step-chips--orange span {
    background: #431407;
    color: #fdba74;
    border-color: #7c2d12;
}

body.dark-mode .step-chips--green span {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #065f46;
}

body.dark-mode .steps-header .section-title {
    color: #f1f5f9;
}

body.dark-mode .steps-header .section-sub {
    color: #94a3b8;
}

/* ── DARK MODE: KEY FEATURES ── */
body.dark-mode .landing-features {
    background: #1e293b;
}

body.dark-mode .landing-features .section-title {
    color: #f1f5f9;
}

body.dark-mode .landing-features .section-sub {
    color: #94a3b8;
}

body.dark-mode .feature-card {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .feature-card:hover {
    border-color: #4f9d1c;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .4);
}

body.dark-mode .feature-card h3 {
    color: #f1f5f9;
}

body.dark-mode .feature-card p {
    color: #94a3b8;
}

/* ===================================================
   MESSAGING SYSTEM
   =================================================== */

/* ── Layout ── */
.msg-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--white);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.msg-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    height: 100%;
    overflow: hidden;
}

/* ── Sidebar Header ── */
.msg-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    flex-shrink: 0;
}

.msg-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

/* ── Tabs (Admin) ── */
.msg-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.msg-tab {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.msg-tab:hover {
    color: var(--primary);
}

.msg-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.msg-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Search ── */
.msg-search-wrap {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.msg-search-wrap .form-control {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border-color: var(--border);
}

/* ── Conversation List ── */
.msg-conv-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.msg-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.msg-conv-item:hover {
    background: var(--bg-secondary);
}

.msg-conv-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

.msg-conv-avatar {
    flex-shrink: 0;
}

.msg-conv-info {
    flex: 1;
    min-width: 0;
}

.msg-conv-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.msg-conv-last {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.msg-conv-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.msg-conv-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.msg-unread-badge {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.msg-conv-delete-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.msg-conv-item:hover .msg-conv-delete-btn {
    opacity: 1;
}

.msg-conv-delete-btn:hover {
    background: var(--danger);
    transform: translateY(-50%) scale(1.1);
}

/* ── Empty State ── */
.msg-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
}

/* ── Chat Empty ── */
.msg-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.msg-chat-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.msg-chat-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.msg-chat-empty-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
}

/* ── Chat Inner ── */
.msg-chat-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Chat Header ── */
.msg-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* ── Messages Area ── */
.msg-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* ── Bubbles ── */
.msg-bubble-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 72%;
    margin-bottom: 6px;
}

.msg-bubble-wrap.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-bubble-wrap.theirs {
    align-self: flex-start;
}

.msg-bubble-avatar {
    flex-shrink: 0;
}

.msg-bubble-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 3px;
    padding-left: 4px;
}

.msg-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
}

.msg-bubble-wrap.mine .msg-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.msg-bubble-wrap.theirs .msg-bubble {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.msg-bubble-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 4px;
    text-align: right;
}

.msg-bubble-wrap.theirs .msg-bubble-time {
    text-align: left;
}

/* ── Input Bar ── */
.msg-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.msg-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 22px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    background: var(--bg-secondary);
    transition: border-color 0.2s, box-shadow 0.2s;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
}

.msg-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 157, 28, 0.1);
    background: var(--white);
}

.msg-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(79, 157, 28, 0.3);
}

.msg-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.08);
}

.msg-send-btn:active {
    transform: scale(0.95);
}

/* ── Avatar ── */
.msg-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.msg-avatar-fallback {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #d4f06a);
    color: #1c3d00;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── User Search Results ── */
.msg-user-results {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.msg-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.msg-user-item:hover {
    background: var(--primary-lighter);
}

.msg-user-item:last-child {
    border-bottom: none;
}

/* ── Dark Mode ── */
body.dark-mode .msg-sidebar {
    background: #1e293b;
    border-right-color: #334155;
}

body.dark-mode .msg-sidebar-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .msg-sidebar-title {
    color: #f1f5f9;
}

body.dark-mode .msg-conv-item:hover {
    background: #263348;
}

body.dark-mode .msg-conv-item.active {
    background: #1a3a0a;
    border-left-color: var(--primary);
}

body.dark-mode .msg-conv-name {
    color: #f1f5f9;
}

body.dark-mode .msg-conv-last {
    color: #64748b;
}

body.dark-mode .msg-chat {
    background: #0f172a;
}

body.dark-mode .msg-chat-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .msg-bubble-wrap.theirs .msg-bubble {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .msg-input-bar {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-mode .msg-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .msg-input:focus {
    background: #1e293b;
    border-color: var(--primary);
}

body.dark-mode .msg-user-item:hover {
    background: #1a3a0a;
}

body.dark-mode .msg-user-results {
    border-color: #334155;
    background: #1e293b;
}

body.dark-mode .msg-tab {
    color: #64748b;
}

body.dark-mode .msg-tab.active {
    color: #84cc16;
    border-bottom-color: #84cc16;
}

body.dark-mode .msg-search-wrap .form-control {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .page-content.msg-page {
        position: relative;
        overflow: hidden;
    }

    .msg-sidebar {
        width: 100%;
        position: absolute;
        z-index: 10;
        height: 100%;
        transition: transform 0.25s ease;
        transform: translateX(0);
    }

    .msg-sidebar.msg-slide-out {
        transform: translateX(-100%);
    }

    .msg-chat {
        position: absolute;
        width: 100%;
        height: 100%;
        transform: translateX(100%);
        transition: transform 0.25s ease;
    }

    .msg-chat.msg-slide-in {
        transform: translateX(0);
    }

    .msg-bubble-wrap {
        max-width: 88%;
    }

    .msg-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: var(--text);
        padding: 4px 8px 4px 0;
        flex-shrink: 0;
    }

    .msg-input-bar {
        padding: 10px 12px;
    }

    .msg-messages {
        padding: 14px 10px;
    }

    .msg-chat-header {
        padding: 12px 14px;
    }
}

.msg-back-btn {
    display: none;
}

.msg-delete-btn {
    display: none;
    position: absolute;
    top: 0;
    right: -28px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.msg-bubble-wrap.mine .msg-delete-btn {
    right: auto;
    left: -28px;
}

.msg-bubble-wrap:hover .msg-delete-btn {
    display: block;
}

.msg-delete-btn:hover {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
}

/* ===== ENHANCED MOBILE RESPONSIVENESS ===== */
/* Better spacing and sizing for all mobile devices */

@media (max-width: 1024px) {
    .landing-hero {
        padding: 80px 20px 60px;
    }

    .landing-hero h1 {
        font-size: 48px;
    }

    .landing-hero>p {
        font-size: 16px;
        max-width: 95%;
    }
}

@media (max-width: 768px) {

    /* Improve form input touch targets */
    .form-control {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 16px;
    }

    /* Better spacing for small screens */
    .hero-btns {
        gap: 14px;
    }

    .hero-btns .btn {
        min-width: auto;
        min-height: 44px;
    }

    /* Improve feature cards on tablet */
    .feature-card {
        padding: 24px 18px;
    }

    .feature-card h3 {
        font-size: 16px;
        line-height: 1.3;
    }

    .feature-card p {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Better step card spacing */
    .step-body {
        padding: 16px 0 16px 16px;
    }

    .step-body h3 {
        font-size: 16px;
        line-height: 1.3;
    }

    .step-body p {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 600px) {

    /* Optimize hero section for small screens */
    .landing-hero {
        padding: 50px 16px 40px;
    }

    .landing-hero h1 {
        font-size: 30px;
        margin-bottom: 12px;
        letter-spacing: -0.5px;
    }

    .landing-hero>p {
        font-size: 15px;
        line-height: 1.5;
    }

    /* Optimize buttons for small screens */
    .hero-btns {
        width: 100%;
        gap: 10px;
    }

    .hero-btns .btn-lg {
        width: 100%;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
    }

    /* Better form control sizing */
    .form-control {
        min-height: 44px;
        font-size: 16px;
    }

    select.form-control {
        min-height: 44px;
    }

    /* Optimize feature cards */
    .feature-card {
        padding: 20px 16px;
        text-align: center;
    }

    .feature-icon-wrap {
        width: 56px;
        height: 56px;
        font-size: 26px;
    }

    .feature-card h3 {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .feature-card p {
        font-size: 13px;
        line-height: 1.5;
        color: var(--text-muted);
    }

    /* Better CTA section spacing */
    .landing-cta .hero-btns {
        gap: 10px;
    }

    .landing-cta .hero-btns .btn-lg {
        width: 100%;
    }
}

@media (max-width: 480px) {

    /* Optimize for small phones */
    .landing-hero {
        padding: 40px 14px 32px;
    }

    .landing-hero h1 {
        font-size: 26px;
        margin-bottom: 10px;
        letter-spacing: -0.3px;
    }

    .landing-hero>p {
        font-size: 14px;
        line-height: 1.5;
    }

    .hero-badge {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 14px;
    }

    /* Stack buttons vertically with full width */
    .hero-btns {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero-btns .btn-lg {
        width: 100%;
        min-height: 44px;
        padding: 12px 14px;
        font-size: 13px;
        justify-content: center;
    }

    /* Form controls optimization */
    .form-control {
        min-height: 44px;
        padding: 11px 12px;
        font-size: 16px;
        border-radius: 8px;
    }

    /* Feature cards on small phones */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 18px 14px;
    }

    .feature-icon-wrap {
        width: 52px;
        height: 52px;
        font-size: 24px;
        margin-bottom: 12px;
    }

    .feature-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .feature-card p {
        font-size: 12px;
    }

    /* Optimize CTA section */
    .landing-cta {
        padding: 32px 14px;
    }

    .landing-cta h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .landing-cta p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    /* Better section spacing */
    .landing-features,
    .landing-steps {
        padding: 32px 14px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .section-sub {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Step items on small screens */
    .step-item {
        grid-template-columns: 44px 1fr;
        margin-bottom: 20px;
    }

    .step-item .step-bubble {
        width: 44px;
        height: 44px;
    }

    .step-bubble-icon {
        font-size: 16px;
    }

    .step-bubble-num {
        font-size: 12px;
    }

    .step-body {
        padding-left: 12px;
    }

    .step-body h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .step-body p {
        font-size: 12px;
        line-height: 1.5;
    }

    .step-chips span {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 360px) {

    /* Extra small devices optimization */
    .landing-hero {
        padding: 36px 12px 28px;
    }

    .landing-hero h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .landing-hero>p {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .hero-badge {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 12px;
    }

    .hero-btns .btn-lg {
        padding: 11px 12px;
        font-size: 12px;
    }

    .feature-card {
        padding: 16px 12px;
    }

    .feature-icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .feature-card h3 {
        font-size: 13px;
    }

    .feature-card p {
        font-size: 11px;
    }

    .landing-cta h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .landing-cta p {
        font-size: 12px;
        margin-bottom: 16px;
    }
}