/* ==========================================================
   Event Card - Admin Panel Stylesheet
   Functional, clean, fast to scan. Not meant to be fancy.
   ========================================================== */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f6f8;
    color: #1f2329;
}

a { color: #2563eb; }

h1 { font-size: 1.4rem; margin: 0; }
h3 { font-size: 1rem; margin: 0 0 0.8rem; color: #444; }

/* ---------------- Login ---------------- */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #14161a;
}

.login-box {
    background: #ffffff;
    padding: 2.4rem 2.2rem;
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 1.6rem;
    font-size: 1.25rem;
}

/* ---------------- Shell / layout ---------------- */

.admin-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.8rem 1.5rem 4rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.toolbar {
    margin-bottom: 1.2rem;
}

/* ---------------- Forms ---------------- */

.form-card {
    background: #ffffff;
    border: 1px solid #e3e5e9;
    border-radius: 8px;
    padding: 1.8rem;
    margin-bottom: 1.6rem;
}

.form-row {
    display: flex;
    gap: 1.2rem;
}

.form-row .form-group { flex: 1; }

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d4d7dc;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

textarea.form-control { resize: vertical; }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group label { margin-bottom: 0; }

small {
    display: block;
    color: #888;
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

hr {
    border: none;
    border-top: 1px solid #e3e5e9;
    margin: 1.6rem 0;
}

.form-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.hero-preview {
    display: block;
    max-width: 280px;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.8rem;
    border: 1px solid #e3e5e9;
}

/* ---------------- Buttons ---------------- */

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.6rem 1.3rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-primary:hover { background: #1d4ed8; }

.btn-secondary {
    background: #eceef1;
    color: #333;
    border: none;
    padding: 0.6rem 1.3rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0;
}

.btn-small {
    font-size: 0.78rem;
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    text-decoration: none;
    display: inline-block;
}

.btn-danger { color: #d33; }

/* ---------------- Data grid ---------------- */

.data-grid {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e3e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.data-grid th {
    text-align: left;
    background: #f9fafb;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #e3e5e9;
}

.data-grid td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #f0f1f3;
    font-size: 0.88rem;
}

.data-grid tr:last-child td { border-bottom: none; }

.badge-published {
    background: #e6f4ea;
    color: #1e7e34;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
}

.badge-draft {
    background: #f1f1f1;
    color: #777;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
}

/* ---------------- Gallery manager ---------------- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border: 1px solid #e3e5e9;
    border-radius: 8px;
    padding: 0.6rem;
    background: #fafbfc;
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.caption-input {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.gallery-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

/* ---------------- Messages ---------------- */

.success-message {
    display: block;
    background: #e6f4ea;
    color: #1e7e34;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.error-message {
    display: block;
    background: #fdecec;
    color: #c0392b;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.field-error {
    color: #c0392b;
    font-size: 0.78rem;
}
