/* =========================
GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #eef2ef;
}

/* =========================
LOGIN PAGE
========================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), linear-gradient(135deg, green, red);
    padding: 20px;
}

.login-box {
    background: white;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    animation: fadeIn 1s ease;
}

.login-logo {
    width: 90px;
    height: 90px;
    margin: auto;
    background: linear-gradient(135deg, green, red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 40px;
    margin-bottom: 20px;
}

.login-box h1 {
    color: #222;
    margin-bottom: 10px;
}

.login-box p {
    color: #666;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 2px solid #ddd;
    font-size: 15px;
}

.input-group input:focus {
    border-color: green;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, green, red);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn:hover {
    transform: scale(1.02);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: left;
}

/* =========================
SYSTEM PAGE
========================= */

.system-page {
    display: none;
    padding: 15px;
}

/* HEADER */

.header {
    background: linear-gradient(135deg, green, red);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.header h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 10px;
}

.header p {
    text-align: center;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: red;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.logout-btn:hover {
    transform: scale(1.05);
}

/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.card i {
    font-size: 40px;
    color: green;
}

.card h2 {
    font-size: 28px;
}

.card p {
    color: #666;
}

/* FORM */

.form-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-title {
    margin-bottom: 20px;
    font-size: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #ddd;
    font-size: 15px;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: green;
    outline: none;
}

/* BUTTONS */

.buttons {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

button {
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.03);
}

.save-btn {
    background: green;
}

.update-btn {
    background: red;
}

.clear-btn {
    background: #333;
}

.export-btn {
    background: #0066cc;
}

/* FILTERS */

.filters {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.filters input {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #ccc;
    font-size: 14px;
}

.filters input:focus {
    border-color: green;
    outline: none;
}

/* TABLE */

.table-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    overflow-x: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

table thead {
    background: linear-gradient(135deg, green, red);
    color: white;
}

table th,
table td {
    padding: 14px;
    border: 1px solid #ddd;
    text-align: left;
}

table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

table tbody tr:hover {
    background: #eef7ee;
}

/* ACTION BUTTONS */

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    margin: 2px;
    transition: 0.3s;
}

.action-btn:hover {
    transform: scale(1.05);
}

.edit-btn {
    background: green;
}

.delete-btn {
    background: red;
}

/* ANIMATION */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    .logout-btn {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        margin-top: 15px;
    }
}

/* CHARTS */

.chart-container {
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
    height: 240px;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.chart-container canvas {
    max-height: 170px !important;
}

/* STATUS MESSAGE */

.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}