/* ============ GYOU ADMIN PANEL ============ */
:root {
    --navy:      #0d2145;
    --navy-deep: #091730;
    --blue:      #2e6be6;
    --blue-dark: #2255c4;
    --bg:        #f5f8fc;
    --text:      #44526a;
    --muted:     #7d899c;
    --border:    #e2e9f2;
    --shadow:    0 1px 3px rgba(13,33,69,.07);
    --head:      'Archivo', 'Segoe UI', sans-serif;
    --body:      'Inter', 'Segoe UI', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--body); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: var(--navy-deep);
    color: #a8bad8;
    display: flex;
    flex-direction: column;
    z-index: 50;
}
.side-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.side-brand img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.side-brand span { font-family: var(--head); font-weight: 800; color: #fff; font-size: 18px; line-height: 1.1; }
.side-brand small { display: block; font-size: 9.5px; letter-spacing: .3em; color: #7ba7f5; font-weight: 700; }
.side-nav { flex: 1; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 7px;
    font-family: var(--head);
    font-weight: 600;
    font-size: 14px;
    color: #a8bad8;
    transition: all .2s;
}
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: var(--blue); color: #fff; }
.nav-badge {
    background: #e94848;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 8px;
}
.side-foot { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.side-foot a { font-size: 13.5px; color: #a8bad8; font-weight: 600; font-family: var(--head); }
.side-foot a:hover { color: #fff; }
.side-foot .logout { color: #f08a8a; }

/* ---- Main ---- */
.main { margin-left: 240px; padding: 30px 36px 60px; max-width: 1160px; }
.main-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.main-head h1 { font-size: 26px; font-weight: 800; }
.main-user { font-size: 13.5px; color: var(--muted); }

.flash {
    background: #e3f6ec;
    border: 1px solid #b5e6cd;
    color: #0a5c39;
    border-radius: 8px;
    padding: 13px 18px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 22px;
}

/* ---- Cards ---- */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 26px 28px;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}
.card > h2 {
    font-size: 17px;
    margin-bottom: 4px;
}
.card > .card-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }

/* ---- Dashboard stats ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
}
.stat-card .num { font-family: var(--head); font-size: 32px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat-card.accent { border-top: 3px solid var(--blue); }

/* ---- Forms ---- */
label { display: block; font-family: var(--head); font-weight: 700; font-size: 13px; color: var(--navy); margin-bottom: 6px; }
label .hint { font-weight: 500; color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border-radius: 7px;
    border: 1px solid #ccd7e6;
    background: #fbfcfe;
    font-family: var(--body);
    font-size: 14.5px;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46,107,230,.13);
}
textarea { resize: vertical; min-height: 96px; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.check-line { display: flex; align-items: center; gap: 10px; }
.check-line input { width: auto; }
.check-line label { margin: 0; }

/* ---- Image slots ---- */
.img-slot { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.img-slot .preview {
    width: 190px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    object-fit: cover;
}
.img-slot .fields { flex: 1; min-width: 240px; }
.dim-note {
    display: inline-block;
    background: #eef4fe;
    border: 1px solid #cfdffa;
    color: var(--blue-dark);
    font-family: var(--head);
    font-weight: 700;
    font-size: 12px;
    border-radius: 5px;
    padding: 3px 10px;
    margin-bottom: 10px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 7px;
    font-family: var(--head);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-sm { padding: 7px 14px; font-size: 11.5px; border-radius: 6px; }
.btn-outline { background: #fff; border-color: #c8d5e8; color: var(--navy); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fff; border-color: #f0c1c1; color: #b03636; }
.btn-danger:hover { background: #b03636; border-color: #b03636; color: #fff; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
    text-align: left;
    font-family: var(--head);
    font-size: 11.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: #fafcff; }
td .thumb { width: 74px; height: 55px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.row-actions { display: flex; gap: 8px; white-space: nowrap; }
.badge {
    display: inline-block;
    font-family: var(--head);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-radius: 5px;
    padding: 3px 9px;
}
.badge-blue  { background: #eef4fe; color: var(--blue-dark); }
.badge-green { background: #e3f6ec; color: #0a5c39; }
.badge-gray  { background: #eef1f6; color: var(--muted); }
.badge-red   { background: #fdeaea; color: #b03636; }

/* ---- Login page ---- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, var(--navy-deep), #14315f); }
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 44px 42px;
    width: min(400px, 92vw);
    box-shadow: 0 28px 64px rgba(0,0,0,.35);
}
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login-brand img { width: 50px; height: 50px; border-radius: 9px; object-fit: cover; }
.login-brand span { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--navy); line-height: 1.1; }
.login-brand small { display: block; font-size: 10px; letter-spacing: .3em; color: var(--blue); font-weight: 700; }
.login-box h1 { font-size: 19px; margin-bottom: 4px; }
.login-box .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }
.login-err {
    background: #fdeaea;
    border: 1px solid #f5c6c6;
    color: #8f1f1f;
    border-radius: 7px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
}
.login-note { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---- Misc ---- */
.muted { color: var(--muted); font-size: 13px; }
.mt { margin-top: 18px; }
.empty { text-align: center; color: var(--muted); padding: 34px 0; font-size: 14px; }

@media (max-width: 900px) {
    .sidebar { position: static; width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
    .side-nav { flex-direction: row; flex-wrap: wrap; padding: 10px; }
    .side-foot { flex-direction: row; margin-left: auto; border: none; }
    .main { margin-left: 0; padding: 22px 18px 50px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
