/* style.css */

/* Global Reset and Typography */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f9;
    color: #333;
}

h1, h2, h3 {
    color: #007bff; /* Primary color */
}

/* --- Container & Layout (Mobile-First) --- */
.dashboard-container {
    display: flex;
    flex-direction: column; /* Stacked layout for mobile */
    min-height: 100vh;
}

/* --- Sidebar Styling --- */
.sidebar {
    background-color: #343a40; /* Dark background for navigation */
    color: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.sidebar .logo {
    color: #28a745; /* Highlight color */
    margin-top: 0;
}
.sidebar nav ul {
    list-style: none;
    padding: 0;
}
.sidebar nav ul li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: white;
    border-bottom: 1px solid #495057;
    transition: background-color 0.3s;
}
.sidebar nav ul li a:hover {
    background-color: #495057;
}

/* --- Main Content --- */
.main-content {
    flex-grow: 1;
    padding: 20px;
}
.main-content section {
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Data Table Styling (Crucial for Responsiveness) --- */
.data-table-wrapper {
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
    margin-top: 15px;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    text-align: left;
    white-space: nowrap; /* Prevents long data from wrapping */
}
.data-table th {
    background-color: #e9ecef;
    font-weight: bold;
}

/* --- Form and Card Styling --- */
.card {
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input[type="text"], 
.form-group input[type="password"], 
.form-group input[type="date"], 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
}

/* Buttons */
.btn-primary {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.logout-btn {
    color: #ffc107 !important;
}

/* Messages */
.error-message {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}
.info-message {
    padding: 10px;
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* --- @media Query for Desktop/Tablet Screens --- */
@media (min-width: 768px) {
    .dashboard-container {
        flex-direction: row; /* Side-by-side layout for desktop */
    }
    
    .sidebar {
        width: 250px;
        flex-shrink: 0; /* Prevents sidebar from shrinking */
    }
    
    .main-content {
        padding: 30px;
    }
    
    /* Login Page Styling for large screens */
    .login-container {
        max-width: 400px;
        margin: 100px auto;
    }
}

/* Login specific styling */
.login-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px; /* Default margin for mobile */
}