/* =============== Global Reset =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

/* =============== Login Styles =============== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #2980b9, #6dd5fa);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.logo {
    width: 80px;
    margin-bottom: 15px;
}

.login-box h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.login-box input,
.login-box select,
.login-box button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.login-box button {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
}

.login-box button:hover {
    background-color: #2980b9;
}

/* =============== Alerts =============== */
.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert.error {
    background-color: #ffe0e0;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.alert.success {
    background-color: #e0ffe0;
    color: #2e7d32;
    border: 1px solid #27ae60;
}

/* =============== Layout =============== */
.layout-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
    background-color: #f9f9f9;
    overflow-y: auto;
}

.dashboard h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* =============== Cards =============== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #34495e;
}

.card h3 i {
    margin-right: 8px;
    color: #3498db;
}

.card p {
    font-size: 14px;
    color: #777;
}

.card a {
    display: inline-block;
    margin-top: 10px;
    color: #0077cc;
    text-decoration: none;
    font-weight: bold;
}

.card a:hover {
    color: #005fa3;
}

/* =============== Forms =============== */
.form-group {
    margin-bottom: 15px;
}

.form-styled {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-styled select,
.form-styled input[type="date"],
.form-styled input[type="time"],
input[type="text"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
}

/* =============== Buttons =============== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #2ecc71;
    color: #fff;
}

.btn-secondary:hover {
    background: #27ae60;
}

.full-width {
    width: 100%;
}

.centered-card {
    text-align: center;
}

/* =============== Tables =============== */
.table-responsive {
    overflow-x: auto;
}

.table-styled {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-styled th,
.table-styled td {
    padding: 12px 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.table-styled th {
    background-color: #3498db;
    color: #fff;
    font-weight: normal;
}

.table-styled tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* =============== Navigation =============== */
.dashboard ul {
    list-style: none;
    margin-top: 20px;
}

.dashboard ul li {
    margin: 10px 0;
}

.dashboard ul li a {
    text-decoration: none;
    color: #3498db;
    transition: 0.3s ease;
}

.dashboard ul li a:hover {
    color: #2c3e50;
}
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
}

/* =============== Media Queries =============== */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        padding: 10px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}
