/* Advanced Owner Portal Styles */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #ffffff;
    --sidebar-text: #64748b;
    --sidebar-active-bg: #f1f5f9;
    --sidebar-active-color: #6366f1;
    --topbar-height: 70px;
    --accent-glow: rgba(99, 102, 241, 0.15);
    
    /* Theme Colors - Light Mode */
    --primary: #6366f1;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark-theme, [data-theme="dark"] {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: rgba(99, 102, 241, 0.15);
}


.advanced-dashboard {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Sidebar */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-brand i { color: #818cf8; }

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Main Content Wrapper */
.dashboard-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.top-bar-left h2 { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }

.top-bar-right { display: flex; align-items: center; gap: 1.5rem; }

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 30px;
    background: var(--bg-primary);
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Content Sections */
.content-wrapper { padding: 2.5rem; max-width: 1600px; margin: 0 auto; width: 100%; }

.dashboard-section { display: none; animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.dashboard-section.active { display: block; }

/* Mobile Utilities */
@media (max-width: 600px) {
    .hide-mobile { display: none !important; }
    .content-wrapper { padding: 1.25rem !important; }
    .top-bar { padding: 0 1rem !important; }
    .top-bar-left h2 { font-size: 1.3rem !important; }
    .top-bar-right { gap: 10px !important; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Table Responsiveness & Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.rooms-table {
    border-collapse: separate;
    border-spacing: 0 12px;
}

.rooms-table tr {
    transition: transform 0.2s, box-shadow 0.2s;
}

.rooms-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05);
}

/* Advanced Card */
.stat-card-advanced {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.stat-content h3 { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); margin-bottom: 5px; }
.stat-content p { color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; margin: 0; }

/* Cyber Vault & Premium Uploads */
.vault-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border-radius: 32px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.vault-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    filter: blur(40px);
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.upload-box {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-box:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #6366f1;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.upload-box i {
    font-size: 2.2rem;
    color: #818cf8;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.upload-box:hover i {
    transform: scale(1.1);
}

.vault-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 14px !important;
    padding: 12px 18px !important;
}

.vault-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2) !important;
}

.preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: none;
    z-index: 10;
}

.stat-visual {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Responsive Grids */
.responsive-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.responsive-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1200px) {
    .responsive-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .responsive-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .responsive-grid-4 { grid-template-columns: 1fr; }
    .stat-card-advanced { padding: 1.25rem; }
    .top-bar { padding: 1rem 1.5rem !important; }
    #kycAlertBanner { 
        flex-direction: column; 
        text-align: center; 
        padding: 2rem !important;
    }
    #kycAlertBanner .btn { width: 100%; }
}

/* Sidebar Drawer logic */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }
    
    .dashboard-sidebar.mobile-open {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0 !important;
        width: 100%;
    }

    .menu-toggle-btn {
        display: flex !important;
    }
    
    .hide-mobile {
        display: none !important;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* Profile Form */
.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }

.form-premium label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #475569; }
.form-premium .form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s;
}
.form-premium .form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--accent-glow); }

/* Stepper Mobile */
@media (max-width: 768px) {
    .stepper { flex-wrap: wrap; gap: 1rem; }
    .stepper::before { display: none; }
    .step { flex: 1 1 40%; }
}
