/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --secondary: #3498db;
    --secondary-dark: #2980b9;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #34495e;
    --gray: #95a5a6;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --spacing: 1rem;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: url('/static/img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* ===== HEADER ===== */
header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-menu span {
    color: var(--light);
}

.user-menu a, .user-menu button {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.user-menu a:hover, .user-menu button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--white);
}

.btn-admin {
    background: var(--secondary);
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    padding: 2rem 0;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card h1 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #219653;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin: 1rem 0;
    display: none;
}

.progress-status {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: var(--light);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-error {
    background: #fdeaea;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid var(--success);
}

.hidden {
    display: none;
}

/* ===== TABLES ===== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light);
}

th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.justify-between {
    justify-content: space-between;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary-dark);
    color: var(--light);
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .user-menu {
        justify-content: center;
    }
    .card {
        padding: 1rem;
    }
    th, td {
        padding: 0.75rem 0.5rem;
    }
}