/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container for Centering Content */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header Styles */
.header {
    background-color: #2c3e50; /* Dark blue-gray */
    color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.header .logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.header .logo a:hover {
    background-color: #34495e; /* Slightly lighter dark blue-gray */
}

/* Navigation Styles */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px; /* Space between nav items */
    flex-wrap: wrap; /* Allows nav items to wrap */
    justify-content: center;
}

.main-nav li a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

.main-nav li a:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #34495e;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    left: 0; /* Align dropdown with its parent link */
    top: 100%; /* Position below the parent link */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #4a627d;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Main Content Area */
.main-content {
    flex-grow: 1; /* Allows content area to take available space */
    padding: 20px 0;
}

/* Footer Styles */
.footer {
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: 15px 0;
    margin-top: auto; /* Pushes footer to the bottom */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

/* Card-like panels */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    outline: none;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    font-weight: bold;
}

.btn-primary {
    background-color: #3498db; /* Bright blue */
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background-color: #2980b9; /* Darker blue */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.btn-danger {
    background-color: #e74c3c; /* Red */
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background-color: #c0392b; /* Darker red */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background-color: #95a5a6; /* Gray */
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background-color: #7f8c8d; /* Darker gray */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(149, 165, 166, 0.4);
}

.btn-success {
    background-color: #27ae60; /* Green */
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    background-color: #229954; /* Darker green */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

.btn-info {
    background-color: #f39c12; /* Orange */
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.btn-info:hover {
    background-color: #e67e22; /* Darker orange */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(243, 156, 18, 0.4);
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto; /* Ensures table is scrollable on small screens */
    border-radius: 12px; /* Apply rounded corners to the container */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden; /* Ensures rounded corners clip content */
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #3498db;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tbody tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.2s ease;
}

.data-table td a.btn {
    padding: 6px 12px; /* Smaller padding for action buttons in table */
    font-size: 0.85em;
    margin-right: 5px;
    margin-bottom: 5px; /* For stacking on small screens */
}

/* Messages (Success, Error, Info) */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid transparent;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Dashboard Metrics */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.metric-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.metric-card .icon {
    font-size: 3em;
    color: #3498db;
    margin-bottom: 15px;
}

.metric-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #555;
}

.metric-card .value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
}

/* No records found message */
.no-records {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    color: #7f8c8d;
    font-style: italic;
    margin-top: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .header .main-nav ul {
        flex-direction: column;
        margin-top: 15px;
        align-items: center;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav li a {
        justify-content: center;
    }

    .dropdown-content {
        position: static; /* Stack dropdown items normally on small screens */
        box-shadow: none;
        width: 100%;
        border-radius: 0;
        opacity: 1;
        transform: translateY(0);
    }

    .dropdown:hover .dropdown-content {
        display: block; /* Ensure it stays visible on touch after tap */
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 15px 0;
    }

    .header .logo a {
        font-size: 1.5em;
    }

    .metric-card {
        padding: 20px;
    }

    .metric-card .icon {
        font-size: 2.5em;
    }

    .metric-card .value {
        font-size: 2em;
    }
}

