/* Base styles */
:root {
    --primary-blue: #007cde;
    --light-blue: rgba(0, 124, 222, 0.1);
    --darker-blue: #0056b3;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #ffffff;
    --white: #ffffff;
    --white-10: rgba(255, 255, 255, 0.1);
    --white-20: rgba(255, 255, 255, 0.2);
}

/* Mobile menu button */
.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
}

body {
    background: linear-gradient(135deg, #007cde 0%, #00a3ff 100%);
    margin: 0;
    padding: 16px;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    gap: 16px;
    box-sizing: border-box;
    color: var(--text-light);
}

/* Glass effect base */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 44, 78, 0.1);
}

/* Sidebar styles */
.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.system-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(12px);
}

.logo-text {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 500;
}

/* Navigation styles */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: var(--text-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: 0.8;
}

/* Main content area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header box */
.header-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 16px 24px;
}

.header-box h1 {
    margin: 0;
    color: var(--text-light);
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

/* Content box */
.content-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    flex: 1;
    min-height: 500px;
}

/* Footer box */
.footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 16px;
    text-align: center;
    color: var(--text-light);
}

/* Active and hover states */
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.mobile-menu-button {
    display: none;
}

.table-section {
    padding: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.add-button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Native tooltip styling */
[title] {
    position: relative;
    cursor: pointer;
}

/* Dashboard Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    height: calc(100% - 40px); /* Account for padding */
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    height: 180px; /* Fixed height for consistency */
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.15);
}

.stat-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.stat-number {
    margin: 0;
    font-size: 48px;
    font-weight: 600;
    color: var(--white);
    line-height: 1;
    text-align: center;
}

.stat-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.stat-label {
    font-size: 16px;
    color: var(--white);
    opacity: 0.9;
    text-align: center;
}

.stat-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 20px;
    color: var(--white);
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        padding: 0;
        margin: 0;
        background: var(--primary-blue);
    }

    .sidebar {
        width: 100%;
        padding: 0;
        margin: 0;
        border-radius: 0;
        background: transparent;
    }

    /* System title section */
    .system-title {
        padding: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        background: transparent;
        text-align: center;
    }

    /* Menu button */
    .mobile-menu-button {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 16px;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border: none;
        margin: 8px 0;
        font-size: 16px;
    }

    /* Main content containers */
    .main-content {
        padding: 16px;
        margin: 0;
        gap: 16px;
        display: flex;
        flex-direction: column;
    }

    .header-box {
        margin: 0;
        padding: 16px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    .content-box {
        margin: 0;
        flex: 1;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    .footer {
        margin: 0;
        padding: 16px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    /* Navigation menu */
    .nav-list {
        display: none;
        padding: 16px;
        margin: 0;
        background: transparent;
    }

    .nav-list.show {
        display: block;
    }

    .nav-item {
        margin-bottom: 8px;
    }

    .nav-link {
        padding: 12px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    .table-header {
        display: flex;
        align-items: center;
        padding: 0 15px;
    }
    
    .search-box {
        width: 250px; /* Fixed width for mobile */
        min-width: 200px; /* Minimum width to prevent too small searchbox */
        max-width: 100%; /* Prevent overflow */
    }
    
    .table-container {
        overflow-x: scroll;
    }

    /*Stat box in Dashboard*/

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

    .stat-box {
        height: 140px;
        padding: 15px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-label {
        font-size: 14px;
    }
}