/* HikariApp Core Dashboard Premium Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0B1120; /* Deep navy matching index header */
    --sidebar-bg: rgba(11, 17, 32, 0.95);
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --primary-cyan: #06b6d4;
    --primary-cyan-glow: rgba(6, 182, 212, 0.4);
    --secondary-color: #0ea5e9;
    --accent-purple: #8b5cf6;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dashboard-layout {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.05), transparent 25%);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #111827;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header img {
    height: 35px;
    margin-right: 12px;
    filter: drop-shadow(0 0 10px var(--primary-cyan-glow));
}

.sidebar-header h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sidebar-header h2 span {
    color: var(--primary-cyan);
    font-weight: 400;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    flex: 1;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 1.5rem 0 0.5rem 1.5rem;
    font-weight: 600;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: #94a3b8; /* gray-400 */
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 12px 12px 0; /* flat left, rounded right */
    margin-bottom: 0.3rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 4px solid transparent;
}

.sidebar-menu li a i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    transform: translateX(5px);
}

.sidebar-menu li a.active {
    background: rgba(30, 41, 59, 0.8); /* Slate 800 - dark contrast */
    color: #06b6d4; /* Bright cyan text */
    border-left: 4px solid #06b6d4; /* Solid cyan left border */
}

.sidebar-menu li a.active i {
    color: #06b6d4;
    filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.4));
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    width: 100%;
    padding: 0.8rem;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.header-logo-mobile { display: none; }

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
    margin-left: 2rem;
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 20px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.header-search input:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px var(--primary-cyan-glow);
    background: rgba(255, 255, 255, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--primary-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 10px var(--primary-cyan-glow);
}

/* Dashboard Body */
.dashboard-body {
    padding: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    margin-bottom: 2.5rem;
}

.page-title h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Glass Cards Premium */
.glass, .widget-card, .stat-card, .prod-card, .profile-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2.5rem;
}
.profile-avatar-large {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-color));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: white; font-weight: bold;
    box-shadow: 0 10px 20px var(--primary-cyan-glow);
}
.profile-info h2 { font-family: 'Outfit'; font-size: 1.5rem; margin-bottom: 5px; }
.role-badge { background: rgba(6, 182, 212, 0.2); color: var(--primary-cyan); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.profile-details { display: flex; gap: 20px; margin-top: 15px; }
.detail-item { display: flex; flex-direction: column; }
.detail-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.detail-value { font-weight: 500; font-size: 0.95rem; }

.stat-card:hover, .widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}

.interactive {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.interactive:hover .stat-footer {
    padding-left: 5px;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-footer {
    font-size: 0.85rem;
    color: var(--primary-cyan);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1rem;
    transition: var(--transition);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-icon.cyan { background: rgba(6, 182, 212, 0.1); color: var(--primary-cyan); }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.stat-badge.up { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.stat-badge.down { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Widgets */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.water-glass-container {
    font-size: 3rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 15px rgba(14, 165, 233, 0.3));
}

.hydration-counter {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
}

.hydration-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-water {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-water:hover {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.btn-water.minus {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.btn-water.minus:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.quote-card {
    border-color: var(--primary-cyan);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.quote-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.quote-author {
    color: var(--primary-cyan);
    font-weight: 600;
}

/* App Drawer Overlay */
.app-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.app-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.app-drawer-content {
    max-width: 900px;
    width: 90%;
    position: relative;
    transform: translateY(50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.app-drawer-overlay.active .app-drawer-content {
    transform: translateY(0);
}

.app-drawer-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.app-drawer-close:hover {
    color: var(--primary-cyan);
    transform: rotate(90deg);
}

.app-drawer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2rem;
}

.app-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

.app-drawer-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.app-drawer-item:hover {
    color: white;
}

.app-drawer-item:hover .app-drawer-icon {
    background: var(--primary-cyan);
    border-color: var(--primary-cyan);
    color: white;
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px var(--primary-cyan-glow);
}

.app-drawer-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Profile / Notif Dropdowns */
.notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: #ef4444; color: white;
    font-size: 0.6rem; font-weight: bold;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.profile-dropdown, .notif-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 260px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 200;
}
.notif-dropdown { width: 320px; }

.profile-dropdown.show, .notif-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header, .notif-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.notif-header h3 { font-size: 1rem; color: white; margin:0; }
.btn-mark-read { background: none; border:none; color: var(--primary-cyan); cursor: pointer; }

.dropdown-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-cyan);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.dropdown-header strong {
    display: block;
    color: white;
}

.dropdown-header span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropdown-menu-list {
    list-style: none;
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.dd-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
}

.dd-icon.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.notif-body { max-height: 300px; overflow-y: auto; padding: 1rem; }
.notif-empty { text-align: center; color: var(--text-muted); padding: 2rem 0; }
.notif-empty i { font-size: 2rem; margin-bottom: 10px; opacity: 0.5; }
.notif-footer { padding: 1rem; text-align: center; border-top: 1px solid var(--border-color); }
.notif-footer a { color: var(--primary-cyan); text-decoration: none; font-size: 0.9rem; font-weight: 600; }

.theme-tile {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}
.theme-tile:hover { transform: scale(1.1); }
.theme-tile.cian { background: #06b6d4; }
.theme-tile.green { background: #22c55e; }
.theme-tile.amber { background: #f59e0b; }
.theme-tile.purple { background: #8b5cf6; }
.theme-tile.rose { background: #f43f5e; }

/* Responsive Fixes */
.sidebar-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.5); z-index: 90; display: none;
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); z-index: 100; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .header-logo-mobile { display: block; }
    .header-search { display: none; }
    .sidebar.active { transform: translateX(0); }
    .sidebar-overlay.active { display: block; opacity: 1; visibility: visible; }
}
