/* ═══════════════════════════════════════════
   MOM DIGITAL — Admin Stylesheet
   ═══════════════════════════════════════════ */

:root {
    --red:        #C0392B;
    --red-dark:   #922B21;
    --sidebar-bg: #1C0A08;
    --text:       #2C2C2C;
    --border:     #E4E4E4;
    --bg:         #F6F4F4;
    --white:      #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1,h2,h3,h4 { font-family: 'Playfair Display', serif; }

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

/* ── Layout ───────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background: var(--sidebar-bg);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
}

.sidebar-logo {
    padding: 22px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 11px;
}

.sidebar-logo img { height: 42px; width: auto; display: block; }
.sidebar-logo span { color: white; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; }

.sidebar-nav { padding: 14px 0; flex: 1; overflow-y: auto; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 18px;
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
    color: white;
    border-left-color: var(--red);
    background: rgba(192,57,43,0.18);
    font-weight: 700;
}

.sidebar-nav a.logout { color: rgba(255,120,120,0.75); margin-top: 8px; }
.sidebar-nav a.logout:hover { color: #ff9090; }
.sidebar-nav .nav-sep { height: 1px; background: rgba(255,255,255,0.07); margin: 10px 0; }

.admin-main {
    margin-left: 230px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.admin-topbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--text);
}

.admin-topbar-user {
    font-size: 0.84rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-body { padding: 28px 32px; flex: 1; }

/* ── Stats ────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-card .num   { font-size: 2rem; font-weight: 700; color: var(--red); line-height: 1; }
.stat-card .label { font-size: 0.82rem; color: #888; margin-top: 6px; }

/* ── Panels ───────────────────────────────── */
.panel {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.panel-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.05rem;
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-weight: 700;
}

.panel-body { padding: 22px; }

/* ── Tables ───────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
    background: #F8F6F6;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #999;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #F2F2F2;
    font-size: 0.88rem;
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FDFAFA; }

/* ── Buttons ──────────────────────────────── */
.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    line-height: 1.2;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary   { background: var(--red);       color: white; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: white; }

.btn-secondary { background: #F0ECEC; color: var(--text); border-color: #E0DCDC; }
.btn-secondary:hover { background: #E4E0E0; color: var(--text); }

.btn-danger    { background: #E74C3C; color: white; border-color: #E74C3C; }
.btn-danger:hover { background: #C0392B; border-color: #C0392B; }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; border-radius: 6px; }

.btn-ghost { background: transparent; color: var(--red); border-color: rgba(192,57,43,0.3); }
.btn-ghost:hover { background: rgba(192,57,43,0.07); color: var(--red-dark); }

/* ── Forms ────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    color: var(--text);
    background: white;
    outline: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.09);
}

.form-group textarea { min-height: 95px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.form-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.form-hint { font-size: 0.78rem; color: #aaa; margin-top: 4px; }

/* ── Upload zone ──────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 36px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #FAFAFA;
    position: relative;
}

.upload-zone:hover, .upload-zone.drag {
    border-color: var(--red);
    background: #FFF5F5;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.upload-icon { font-size: 2.4rem; margin-bottom: 10px; }
.upload-text { font-size: 0.92rem; color: #888; }
.upload-text strong { color: var(--red); }

/* ── Photo grid ───────────────────────────── */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.photo-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.photo-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.photo-card-body { padding: 10px 12px; }

.photo-card-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-card-actions { display: flex; gap: 6px; }

/* ── Alerts ───────────────────────────────── */
.alert {
    padding: 11px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.88rem;
}

.alert-success { background: #D5F5E3; color: #1A7A42; border: 1px solid #A9DFBF; }
.alert-error   { background: #FADBD8; color: #922B21; border: 1px solid #F1948A; }
.alert-info    { background: #D6EAF8; color: #1A5276; border: 1px solid #AED6F1; }

/* ── Badges ───────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-on  { background: #D5F5E3; color: #1A7A42; }
.badge-off { background: #F5F5F5; color: #999; }

/* ── tipo labels ──────────────────────────── */
.tipo-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #FADBD8;
    color: #922B21;
}

/* ── Login page ───────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #922B21 0%, #C0392B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 46px 40px;
    width: 100%;
    max-width: 390px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
}

.login-logo { height: 80px; margin: 0 auto 22px; }

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    color: var(--text);
    margin-bottom: 6px;
}

.login-sub { font-size: 0.86rem; color: #999; margin-bottom: 28px; }

.login-box .form-group { text-align: left; }

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.96rem;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s;
    letter-spacing: 0.04em;
}

.login-btn:hover { background: var(--red-dark); }

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .sidebar    { display: none; }
    .admin-main { margin-left: 0; }
    .admin-body { padding: 18px; }
    .admin-topbar { padding: 0 18px; }
    .form-row { grid-template-columns: 1fr; }
    .photos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
