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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
}

.primary-btn {
    background: #007bff;
    color: #ffffff;
}

.primary-btn:hover {
    background: #0056b3;
}

.secondary-btn {
    background: #6c757d;
    color: #ffffff;
}

.secondary-btn:hover {
    background: #5a6268;
}

.error-message {
    color: #dc3545;
    margin-top: 10px;
}

/* Login Page Styling */
.login-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 25px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 15px;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50; /* Dark blue/grey */
    color: #ecf0f1;\n    padding: 20px;
    flex-shrink: 0;
    overflow-y: auto; /* Allow scrolling for many menu items */
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar .logo h3 {
    font-size: 1.5rem;
    color: #007bff; /* Highlight color */
}

.main-nav ul {
    list-style: none;
}

.main-nav ul li {
    margin-bottom: 10px;
}

.main-nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: #34495e; /* Slightly lighter dark */
    color: #007bff; /* Highlight color */
}

.main-nav .has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav .has-submenu > a::after {
    content: '▼'; /* Unicode down arrow */
    font-size: 0.7em;
    margin-left: 10px; /* Space out arrow */
    transition: transform 0.3s ease;
}

.main-nav .has-submenu.expanded > a::after {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    border-left: 2px solid #007bff;
    display: none; /* Hidden by default */
}
/* Show submenu when parent is expanded */
.has-submenu.expanded .submenu {
    display: block;
}
.submenu li a {
    font-size: 0.9em;
    padding: 8px 15px;
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #f4f4f4;
    overflow-y: auto; /* Allow scrolling for content */
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.dashboard-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.content-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.content-section h3 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Overview Grid Styling */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.overview-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.overview-card h4 {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.overview-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #343a40;
}

.small-progress.progress-bar {
    height: 6px;
    margin-top: 10px;
}

/* Performance Grid Styling */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.performance-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.performance-card h4 {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 15px;
}

.performance-card .stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #28a745; /* Green for low usage */
    width: 0%; /* Will be set by JS */
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

/* Adjust color based on usage (JS will handle this dynamically) */
.progress-fill.yellow {
    background-color: #ffc107; /* Yellow for moderate usage */
}
.progress-fill.red {
    background-color: #dc3545; /* Red for high usage */
}

/* Contacts Display Styling */
#contacts-display table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#contacts-display th,
#contacts-display td {
    padding: 10px;
    border: 1px solid #eee;\n    text-align: left;
}

#contacts-display th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding-bottom: 0;
    }

    .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav ul li {
        margin: 0 10px 10px 10px;
    }

    .main-nav ul li a {
        padding: 8px 12px;
    }

    .submenu {
        border-left: none;
        padding-left: 0;
        text-align: center;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-header h2 {
        margin-bottom: 15px;
    }

    .overview-grid, .performance-grid {
        grid-template-columns: 1fr; /* Stack columns on small screens */
    }
}
