/* ========================
   GLOBAL STYLES
   ======================== */

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f9f9f9;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================
   NAVBAR
   ======================== */

.navbar {
    background-color: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.navbar-brand a {
    text-decoration: none;
    color: inherit;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.btn-logout {
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #E74C3C;
}

/* ========================
   MESSAGES
   ======================== */

.messages {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 5;
}
@media (max-width: 720px) {
    .messages { padding: 0 1rem; }
}

.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-alert {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
}

/* ========================
   BUTTONS
   ======================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: #E74C3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

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

.btn-secondary:hover {
    background-color: #00B8A9;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* ========================
   MAIN CONTENT
   ======================== */

.main-content {
    min-height: calc(100vh - 200px);
    /* --nav-height set in base.html (108px desktop / 68px mobile). One source
       of truth so bumping the logo or nav height never re-introduces clipping. */
    padding-top: var(--nav-height, 108px);
}
/* Hero extends behind the nav with its own full-bleed gradient; opt it out
   of the global offset so we don't double-pad. Only applies when hero is the
   first child (no flash message above it). */
.main-content > .hero:first-child {
    margin-top: calc(-1 * var(--nav-height, 108px));
}

/* ========================
   FOOTER
   ======================== */

.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer p {
    margin: 10px 0;
}

/* ========================
   FORMS
   ======================== */

form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) {
    .navbar-menu {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .container {
        padding: 0 15px;
    }
}
