/* ==== Admin Panel ==== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Rubik', system-ui, sans-serif;
    background: #0a0a0a;
    color: #c7c7c7;
    font-size: 14px;
    line-height: 1.5;
}
a { color: #eb5a3e; text-decoration: none; }
a:hover { color: #af3119; }

.admin-body { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
    width: 240px;
    background: #050505;
    border-right: 1px solid #1a1a1a;
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-logo { padding: 0 20px 25px; border-bottom: 1px solid #1a1a1a; margin-bottom: 15px; }
.admin-logo a { color: #fff; font-family: 'Oswald', sans-serif; font-size: 18px; text-transform: uppercase; }
.admin-logo span { color: #eb5a3e; }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav a {
    padding: 12px 20px;
    color: #B1B1B1;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
    transition: all .2s;
}
.admin-nav a:hover { background: #111; color: #fff; }
.admin-nav a.active { background: #111; color: #eb5a3e; border-left-color: #eb5a3e; }
.admin-nav a.logout { margin-top: 30px; color: #969696; }

/* Main */
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 30px;
    background: #050505;
    border-bottom: 1px solid #1a1a1a;
}
.admin-topbar h1 { font-family: 'Oswald', sans-serif; font-size: 1.4rem; color: #fff; }
.admin-user { color: #969696; }
.admin-content { padding: 30px; }

/* Alertas */
.admin-alert { padding: 12px 18px; border-radius: 4px; margin-bottom: 20px; }
.admin-alert.success { background: #14331a; border-left: 4px solid #25D366; color: #b8e6c4; }
.admin-alert.error   { background: #3a1a1a; border-left: 4px solid #eb5a3e; color: #f0b8b0; }

/* Stats */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: #0f0f0f; border: 1px solid #1a1a1a; padding: 22px;
    display: flex; align-items: center; gap: 18px;
}
.stat-card i { font-size: 32px; color: #eb5a3e; }
.stat-card strong { display: block; font-size: 26px; color: #fff; font-family: 'Oswald', sans-serif; }
.stat-card span { color: #969696; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* Painéis */
.admin-panel { background: #0f0f0f; border: 1px solid #1a1a1a; padding: 22px; margin-bottom: 20px; }
.admin-panel h2 { font-family: 'Oswald', sans-serif; font-size: 1.1rem; color: #fff; margin-bottom: 18px; }

/* Tabelas */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #1a1a1a; }
.admin-table th { color: #969696; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:hover td { background: #131313; }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table .actions a, .admin-table .actions button {
    background: none; border: none; cursor: pointer; color: #969696; font-size: 15px;
}
.admin-table .actions a:hover { color: #eb5a3e; }
.admin-table .actions button:hover { color: #eb5a3e; }

.badge { padding: 3px 10px; border-radius: 3px; font-size: 11px; text-transform: uppercase; }
.badge-published { background: #14331a; color: #4ade80; }
.badge-draft     { background: #2a2a2a; color: #969696; }

/* Ações */
.admin-actions { margin-bottom: 20px; text-align: right; }

/* Botões */
.button-primary {
    display: inline-block;
    background: #eb5a3e;
    color: #fff;
    padding: 11px 22px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .5px;
    transition: background .2s;
}
.button-primary:hover { background: #af3119; color: #fff; }

/* Form */
.admin-form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 25px; align-items: start; }
.form-main, .form-side { background: #0f0f0f; border: 1px solid #1a1a1a; padding: 22px; }
.admin-form label, .form-main label, .form-side label { display: block; margin-bottom: 16px; }
.admin-form label > span { display: block; margin-bottom: 6px; color: #969696; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.admin-form input, .admin-form select, .admin-form textarea {
    width: 100%; padding: 10px 12px;
    background: #000; border: 1px solid #1a1a1a; color: #fff;
    font-family: inherit; font-size: 14px; border-radius: 3px;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
    outline: none; border-color: #eb5a3e;
}
.admin-form fieldset { border: 1px solid #1a1a1a; padding: 18px; margin-top: 20px; }
.admin-form legend { padding: 0 10px; color: #969696; font-size: 12px; text-transform: uppercase; }

/* Login */
.admin-login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #050505;
}
.admin-login-box {
    background: #0f0f0f; border: 1px solid #1a1a1a;
    padding: 40px; width: 100%; max-width: 400px;
}
.admin-login-box h1 { font-family: 'Oswald', sans-serif; color: #fff; text-align: center; font-size: 1.6rem; }
.admin-login-box .subtitle { text-align: center; color: #969696; margin-bottom: 25px; font-size: 13px; text-transform: uppercase; }
.admin-login-box label { display: block; margin-bottom: 16px; }
.admin-login-box label > span { display: block; margin-bottom: 6px; color: #969696; font-size: 12px; }
.admin-login-box input {
    width: 100%; padding: 11px 14px;
    background: #000; border: 1px solid #1a1a1a; color: #fff; font-size: 14px;
}
.admin-login-box input:focus { outline: none; border-color: #eb5a3e; }
.admin-login-box .button-primary { width: 100%; margin-top: 10px; }

@media (max-width: 900px) {
    .admin-sidebar { width: 60px; }
    .admin-logo a span, .admin-nav a:not(.active)::after { display: none; }
    .admin-nav a { justify-content: center; padding: 14px 0; }
    .admin-nav a span { display: none; }
    .admin-form-grid { grid-template-columns: 1fr; }
}

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.quick-action {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    color: #c7c7c7;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .5px;
    transition: all .2s ease;
}
.quick-action:hover { border-color: #eb5a3e; color: #eb5a3e; }
.quick-action i { font-size: 18px; color: #eb5a3e; }

/* ==== Image Picker ==== */
.image-picker { margin-bottom: 20px; }
.image-picker label > span {
    display: block; margin-bottom: 6px;
    color: #969696; font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
}
.image-picker-input {
    width: 100%; padding: 10px 12px;
    background: #000; border: 1px solid #1a1a1a; color: #fff;
    font-family: inherit; font-size: 14px; border-radius: 3px;
}
.image-picker-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.image-picker-actions button {
    background: #1a1a1a; color: #c7c7c7; border: 1px solid #262626;
    padding: 8px 14px; cursor: pointer; font-size: 12px;
    text-transform: uppercase; letter-spacing: .5px;
    transition: all .2s;
}
.image-picker-actions button:hover { border-color: #eb5a3e; color: #eb5a3e; }
.image-picker-preview { margin-top: 12px; position: relative; display: inline-block; max-width: 100%; }
.image-picker-preview img {
    max-width: 100%; max-height: 200px; border: 1px solid #1a1a1a; border-radius: 3px;
}

/* ==== Modal de galeria ==== */
.gallery-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.85);
    z-index: 100000; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.gallery-modal[hidden] { display: none; }
.gallery-modal-inner {
    background: #0f0f0f; border: 1px solid #1a1a1a;
    max-width: 900px; width: 100%; max-height: 80vh; overflow-y: auto;
    padding: 25px; position: relative;
}
.gallery-modal-close {
    position: absolute; top: 12px; right: 15px;
    background: none; border: none; color: #969696;
    font-size: 24px; cursor: pointer;
}
.gallery-modal h3 { font-family: Oswald, sans-serif; margin-bottom: 18px; color: #fff; }
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.gallery-item {
    cursor: pointer; border: 2px solid transparent;
    border-radius: 3px; overflow: hidden; aspect-ratio: 1;
    background: #000; position: relative;
}
.gallery-item:hover { border-color: #eb5a3e; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .del {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,.7); color: #fff; border: none;
    width: 24px; height: 24px; cursor: pointer; border-radius: 3px;
    opacity: 0; transition: opacity .2s;
}
.gallery-item:hover .del { opacity: 1; }
.gallery-item .del:hover { background: #eb5a3e; }