/* assets/css/style.css */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --gradient-purple: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    --bg-light: #f4f7f6;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --sidebar-width: 250px;
    --navbar-bottom-height: 65px;
    --white-glass: rgba(255, 255, 255, 0.95);
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 0;
}

/* Typography & Utilities */
.text-purple { color: var(--secondary-color) !important; }
.bg-purple { background-color: #6f42c1 !important; color: #ffffff !important; }
.bg-purple-subtle { background-color: #f1ecf9 !important; color: #6f42c1 !important; border: 1px solid #d8ccf0 !important; }
.bg-purple-gradient { background: var(--gradient-purple) !important; color: white; }
.border-purple { border-color: #6f42c1 !important; }
.btn-primary { 
    background: var(--gradient-purple); 
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
    background: linear-gradient(135deg, #6b4394 0%, #5a6ed6 100%);
    color: white;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--white-glass);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}
.glass-card:hover {
    transform: translateY(-2px);
}

/* Layout Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1030;
    transition: all 0.3s ease;
}
.sidebar .brand {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.sidebar .brand img { width: 35px; }

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-menu li a i {
    font-size: 1.25rem;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
    color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
    border-right: 4px solid var(--primary-color);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

/* Top Navbar inside Main Content (Desktop) */
.top-header {
    background: white;
    padding: 1rem 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bottom Navbar (Mobile) */
.bottom-navbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-bottom-height);
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 1040;
    justify-content: flex-start;
    align-items: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.bottom-navbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}
.bottom-navbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    transition: all 0.2s;
    flex: 1 0 auto;
    min-width: 68px;
    padding: 0.4rem 0.25rem;
    text-align: center;
}
.bottom-navbar a i {
    font-size: 1.35rem;
    margin-bottom: 2px;
}
.bottom-navbar a span {
    font-size: 0.68rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 0 2px;
    display: block;
}
.bottom-navbar a.active, .bottom-navbar a:hover {
    color: var(--primary-color);
    font-weight: 600;
}

/* Splashscreen */
#splashscreen {
    position: fixed;
    top: 0; left:0; width:100%; height:100%;
    background: var(--gradient-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    color: white;
    transition: opacity 0.5s ease;
}
.fade-out { opacity: 0; pointer-events: none; }

/* Table adjustments */
.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Helper Tooltip Style */
.helper-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}
.info-card {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    body { padding-bottom: calc(var(--navbar-bottom-height) + 15px + env(safe-area-inset-bottom, 0px)); }
    .sidebar { display: none; }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    .top-header { margin-bottom: 1rem; padding: 1rem; flex-direction: column; align-items: flex-start; gap: 10px; }
    .bottom-navbar { 
        display: flex; 
        padding-bottom: env(safe-area-inset-bottom, 0px);
        height: calc(var(--navbar-bottom-height) + env(safe-area-inset-bottom, 0px));
    }
}
