:root {

    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --bg: #f4f7fb;

    --card: #ffffff;

    --text: #111827;

    --muted: #6b7280;

    --border: #e5e7eb;

    --radius: 18px;

    --shadow: 0 10px 30px rgba(0, 0, 0, .08);

}

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {

    font-family:
        Inter,
        Segoe UI,
        sans-serif;

    background: var(--bg);

    color: var(--text);

}

a {

    text-decoration: none;

}

.page {

    display: flex;

    min-height: 100vh;

}

.sidebar {

    width: 260px;

    background: #111827;

    color: white;

    display: flex;

    flex-direction: column;

}

.content {

    flex: 1;

    display: flex;

    flex-direction: column;

}

.topbar {

    height: 72px;

    background: white;

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 30px;

}

.main {

    flex: 1;

    padding: 32px;

    width: 100%;

    overflow-x: hidden;

}

.card {

    background: white;

    border: none;

    border-radius: var(--radius);

    box-shadow: var(--shadow);

}

/* SIDEBAR */

.sidebar {

    background: #0f172a;

    width: 260px;

    display: flex;

    flex-direction: column;

}

.logo {

    padding: 30px 25px;

    font-size: 24px;

    font-weight: 700;

    color: white;

    border-bottom: 1px solid rgba(255, 255, 255, .08);

}

.menu {

    padding: 20px 15px;

}

.menu a {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 14px 18px;

    margin-bottom: 8px;

    border-radius: 12px;

    color: #cbd5e1;

    font-weight: 500;

    transition: .25s;

}

.menu a:hover {

    background: #2563eb;

    color: white;

    transform: translateX(4px);

}

.menu a.active {

    background: #2563eb;

    color: white;

}

.menu i {

    font-size: 18px;

    width: 22px;

    text-align: center;

}

/* TOPBAR */

.topbar {

    background: white;

    height: 80px;

    padding: 0 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom: 1px solid #e5e7eb;

}

.top-title {

    font-size: 24px;

    font-weight: 700;

}

.profile {

    display: flex;

    align-items: center;

    gap: 12px;

}

.avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    background: #2563eb;

    color: white;

    display: flex;

    justify-content: center;

    align-items: center;

    font-weight: 700;

    font-size: 18px;

}

/* HERO */

.hero {

    background: linear-gradient(135deg,
            #2563eb,
            #4f46e5);

    border-radius: 22px;

    padding: 28px 36px;

    color: white;

    margin-bottom: 30px;

    box-shadow: 0 15px 40px rgba(37, 99, 235, .25);

}

.hero h2 {

    font-size: 30px;

    font-weight: 700;

    margin-bottom: 6px;

}

.hero p {

    opacity: .9;

    font-size: 16px;

    margin-bottom: 25px;

}

.hero-buttons {

    display: flex;

    gap: 15px;

    flex-wrap: wrap;

}

.hero-buttons .btn {

    padding: 12px 24px;

    border-radius: 12px;

    font-weight: 600;

}

/* STATS */

.stats {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 20px;

    margin-bottom: 30px;

}

.stat-card {

    background: white;

    border-radius: 18px;

    padding: 25px;

    box-shadow: var(--shadow);

    transition: .25s;

}

.stat-card:hover {

    transform: translateY(-5px);

}

.stat-title {

    color: #64748b;

    font-size: 14px;

    margin-bottom: 10px;

}

.stat-value {

    font-size: 34px;

    font-weight: 700;

}

.blue {

    border-left: 5px solid #2563eb;

}

.green {

    border-left: 5px solid #10b981;

}

.orange {

    border-left: 5px solid #f59e0b;

}

.red {

    border-left: 5px solid #ef4444;

}

/* CATEGORY */

.category-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 20px;

    margin-bottom: 30px;

}

.category-card {

    position: relative;

    overflow: hidden;

    border-radius: 20px;

    padding: 26px;

    background: white;

    box-shadow: var(--shadow);

    transition: .25s;

    cursor: pointer;
    min-height: 180px;

    width: 100%;

}

.category-card:hover {

    transform: translateY(-6px);

    box-shadow: 0 18px 40px rgba(0, 0, 0, .12);

}

.category-card::before {

    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 6px;

    height: 100%;

    background: #2563eb;

}

.category-icon {

    width: 62px;

    height: 62px;

    border-radius: 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 28px;

    margin-bottom: 18px;

    color: white;

}

.category-name {

    font-size: 20px;

    font-weight: 700;

    margin-bottom: 6px;

}

.category-desc {

    font-size: 14px;

    color: #64748b;

    margin-bottom: 18px;

}

.category-count {

    font-size: 34px;

    font-weight: 700;

}

.business {

    background: #2563eb;

}

.personal {

    background: #10b981;

}

.hotel {

    background: #8b5cf6;

}

.company {

    background: #f59e0b;

}

.others {

    background: #ef4444;

}

/* DOCUMENTS */

.document-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fill,
            minmax(320px, 1fr));

    gap: 22px;

    margin-top: 25px;

}

.document-card {

    background: white;

    border-radius: 18px;

    padding: 22px;

    box-shadow: var(--shadow);

    transition: .25s;

}

.document-card:hover {

    transform: translateY(-5px);

}

.document-header {

    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 18px;

}

.file-icon {

    width: 58px;

    height: 58px;

    border-radius: 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 28px;

    background: #2563eb;

    color: white;

}

.document-title {

    font-size: 18px;

    font-weight: 700;

}

.document-name {

    font-size: 14px;

    color: #64748b;

    margin-top: 4px;

    word-break: break-word;

}

.document-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 20px;

}

.document-actions {

    display: flex;

    gap: 8px;

}

@media(max-width:992px) {

    .stats {

        grid-template-columns:
            repeat(2, 1fr);

    }

}

@media(max-width:576px) {

    .stats {

        grid-template-columns: 1fr;

    }

}

.document-title {

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}

.document-name {

    height: 40px;

    overflow: hidden;

}

.document-card {

    min-height: 240px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

}

/* SEARCH */

.search-box {

    width: 420px;

    position: relative;

}

.search-box input {

    width: 100%;

    height: 44px;

    border-radius: 12px;

    border: 1px solid #dbe3ec;

    padding: 0 18px 0 42px;

    outline: none;

    transition: .25s;

}

.search-box input:focus {

    border-color: #2563eb;

    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);

}

.search-icon {

    position: absolute;

    left: 14px;

    top: 13px;

    color: #94a3b8;

}

/* TOPBAR RIGHT */

.top-right {

    display: flex;

    align-items: center;

    gap: 18px;

}

.icon-button {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    display: flex;

    justify-content: center;

    align-items: center;

    background: #f1f5f9;

    cursor: pointer;

    transition: .25s;

}

.icon-button:hover {

    background: #2563eb;

    color: white;

}

.notification {

    position: relative;

}

.notification::after {

    content: "";

    position: absolute;

    right: 11px;

    top: 11px;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #ef4444;

}

/* LOGO */

.logo {

    height: 80px;

    display: flex;

    align-items: center;

    padding: 0 24px;

    font-size: 24px;

    font-weight: 700;

    color: white;

    border-bottom: 1px solid rgba(255, 255, 255, .08);

}

/* MENU */

.menu {

    padding: 20px 15px;

    flex: 1;

}

.menu-title {

    color: #64748b;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;

    margin: 20px 12px 10px;

    text-transform: uppercase;

}

/* STORAGE */

.storage {

    margin: 20px;

    padding: 18px;

    background: rgba(255, 255, 255, .06);

    border-radius: 16px;

    color: white;

}

.storage-title {

    font-size: 13px;

    margin-bottom: 12px;

    opacity: .8;

}

.storage-bar {

    height: 8px;

    background: rgba(255, 255, 255, .15);

    border-radius: 20px;

    overflow: hidden;

    margin-bottom: 10px;

}

.storage-fill {

    height: 100%;

    width: 24%;

    background: #3b82f6;

    border-radius: 20px;

}

.storage small {

    color: #cbd5e1;

}

.sidebar {

    justify-content: space-between;

}

/* UPLOAD */

.upload-card {

    background: white;

    border-radius: 20px;

    padding: 40px;

    box-shadow: var(--shadow);

}

.drop-zone {

    border: 3px dashed #cbd5e1;

    border-radius: 20px;

    padding: 60px;

    text-align: center;

    cursor: pointer;

    transition: .25s;

    background: #fafcff;

}

.drop-zone:hover {

    border-color: #2563eb;

    background: #f5f9ff;

}

.drop-zone.dragover {

    border-color: #2563eb;

    background: #eff6ff;

}

.upload-icon {

    font-size: 64px;

    color: #2563eb;

    margin-bottom: 20px;

}

.file-info {

    display: none;

    margin-top: 25px;

    padding: 20px;

    background: #f8fafc;

    border-radius: 14px;

}

.preview-container {

    display: none;

    margin-top: 25px;

    padding: 20px;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    background: white;

}

.preview-image {

    max-width: 100%;

    max-height: 280px;

    border-radius: 12px;

    display: none;

    margin: auto;

}

.preview-icon {

    font-size: 72px;

    color: #2563eb;

    text-align: center;

    display: block;

}

.preview-meta {

    margin-top: 18px;

    text-align: center;

}

.preview-title {

    font-size: 18px;

    font-weight: 600;

}

.preview-size {

    color: #64748b;

    font-size: 14px;

    margin-top: 5px;

}

.progress-wrapper {

    display: none;

    margin-top: 25px;

}

.progress {

    height: 12px;

    border-radius: 20px;

    overflow: hidden;

    background: #e5e7eb;

}

.progress-bar {

    width: 0%;

    background: #2563eb;

    transition: width .2s;

}

.progress-text {

    margin-top: 10px;

    font-size: 14px;

    font-weight: 600;

    text-align: center;

    color: #2563eb;

}

#cameraButton {

    border-radius: 12px;

    padding: 10px 20px;

    font-weight: 600;

}

/* TOAST */

.toast-container {

    position: fixed;

    top: 25px;

    right: 25px;

    z-index: 9999;

}

.toast-message {

    min-width: 320px;

    padding: 16px 20px;

    border-radius: 14px;

    background: white;

    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 12px;

    animation: slideIn .25s ease;

}

.toast-success {

    border-left: 5px solid #10b981;

}

.toast-error {

    border-left: 5px solid #ef4444;

}

.toast-warning {

    border-left: 5px solid #f59e0b;

}

.toast-icon {

    font-size: 22px;

}

@keyframes slideIn {

    from {

        opacity: 0;

        transform: translateX(40px);

    }

    to {

        opacity: 1;

        transform: translateX(0);

    }

}

.profile-avatar {

    width: 140px;

    height: 140px;

    border-radius: 50%;

    background: #2563eb;

    color: white;

    font-size: 54px;

    font-weight: 700;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: auto;

    box-shadow: 0 10px 25px rgba(37, 99, 235, .25);

}

.menu-button {

    display: none;

    position: fixed;

    top: 15px;

    left: 15px;

    z-index: 1200;

    width: 48px;

    height: 48px;

    border: none;

    border-radius: 12px;

    background: #2563eb;

    color: white;

    font-size: 24px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);

}


/* ===========================================================
   MOBILE LAYOUT
=========================================================== */

.menu-button {

    display: none;

    position: fixed;

    top: 15px;

    left: 15px;

    width: 48px;

    height: 48px;

    border: none;

    border-radius: 12px;

    background: #2563eb;

    color: #fff;

    font-size: 24px;

    z-index: 1200;

    cursor: pointer;

    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);

}



@media (max-width:992px) {

    /* Floating menu button */

    .menu-button {

        display: flex;

        align-items: center;

        justify-content: center;

    }

    /* Sidebar */

    .sidebar {

        position: fixed;

        top: 0;

        left: -260px;

        width: 260px;

        height: 100vh;

        transition: left .30s ease;

        z-index: 1100;

    }

    .sidebar.show {

        left: 0;

    }

    /* Main content */

    .content {

        width: 100%;

        margin-left: 0 !important;

        padding: 24px 16px !important;

    }

    .topbar {

        padding-left: 72px;

        height: 70px;

    }

    .search-box {

        width: 100%;

        max-width: 220px;

    }

    /* Hero */

    .hero {

        padding: 22px;

        border-radius: 18px;

    }

    .hero h2 {

        font-size: 28px;

    }

    .hero-buttons {

        display: flex;

        flex-direction: column;

        gap: 12px;

    }

    .hero-buttons .btn {

        width: 100%;

    }

    /* Dashboard */

    .stats {

        grid-template-columns: 1fr;

    }

    .category-grid {

        grid-template-columns: 1fr;

    }

    /* Upload */

    .upload-card {

        padding: 22px;

        margin: 12px 0;

    }

    .drop-zone {

        padding: 30px 20px;

    }

    /* Tables */

    .table-responsive {

        overflow-x: auto;

    }



}

body.sidebar-open {

    overflow: hidden;

}

/* Responsive UI refinement */
.content { min-width: 0; }
.main { max-width: 1600px; margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 100; }
.sidebar-backdrop { display: none; }

body { background: radial-gradient(circle at 85% 0%, rgba(37,99,235,.08), transparent 28rem), var(--bg); line-height: 1.5; }
.sidebar { background: linear-gradient(180deg,#0f172a 0%,#111d35 100%); box-shadow: 12px 0 32px rgba(15,23,42,.08); }
.topbar-heading { min-width: 0; }
.top-title { line-height: 1.2; }
.menu a:focus-visible,.menu-button:focus-visible,.btn:focus-visible { outline: 3px solid rgba(96,165,250,.55); outline-offset: 2px; }
.hero { position: relative; overflow: hidden; background: linear-gradient(125deg,#1d4ed8 0%,#4f46e5 55%,#7c3aed 100%); }
.hero::after { content:""; position:absolute; width:260px; height:260px; right:-70px; top:-125px; border-radius:50%; background:rgba(255,255,255,.1); }
.hero > * { position:relative; z-index:1; }
.btn { border-radius:11px; font-weight:600; }
.form-control,.form-select { border-radius:11px; min-height:46px; }
.form-control:focus,.form-select:focus { border-color:#60a5fa; box-shadow:0 0 0 4px rgba(37,99,235,.12); }
.document-card { border:1px solid rgba(226,232,240,.85); }
.document-header > div:last-child { min-width:0; }
.upload-card { max-width: 980px; margin: 0 auto; }
.sidebar-backdrop { position:fixed; inset:0; z-index:1050; background:rgba(15,23,42,.48); backdrop-filter:blur(2px); opacity:0; visibility:hidden; transition:.25s ease; }
.sidebar-backdrop.show { opacity:1; visibility:visible; }

@media (max-width:992px) {
    .content { padding:0 !important; }
    .main { padding:22px 18px 36px; }
    .topbar { padding:0 18px 0 78px; }
    .sidebar { overflow-y:auto; }
    .sidebar-backdrop { display:block; }
}

@media (max-width:576px) {
    .menu-button { top:12px; left:12px; width:44px; height:44px; }
    .topbar { height:68px; padding-left:70px; }
    .top-title { font-size:20px; }
    .topbar small { display:none; }
    .main { padding:18px 14px 30px; }
    .hero { padding:22px 20px; margin-bottom:20px; }
    .hero h2 { font-size:24px; }
    .hero p { margin-bottom:18px; }
    .upload-card,.card.p-4 { padding:20px !important; border-radius:16px; }
    .document-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
    .document-card { min-height:0; padding:18px; }
    .document-footer { align-items:flex-end; gap:12px; }
    .document-actions .btn { min-width:40px; min-height:40px; }
    .input-group { display:grid; grid-template-columns:1fr auto; }
    .input-group .form-control { grid-column:1/-1; width:100%; border-radius:11px !important; margin-bottom:8px; }
    .input-group .btn { border-radius:11px !important; }
    .drop-zone { padding:30px 16px; }
    .upload-icon { font-size:48px; }
    .toast-container { left:14px; right:14px; top:78px; }
    .toast-message { min-width:0; width:100%; }
    .profile-avatar { width:104px; height:104px; font-size:40px; }
    .table-responsive { border-radius:14px; }
    .table th,.table td { min-width:110px; padding:12px; vertical-align:middle; }
}
