:root {
    --gold: #d4af37;
    --gold-dark: #bfa100;
    --navy: #1a202c;
    --navy-light: #2c3e50;
    --bg: #f5f3ee;
    --card: #ffffff;
    --border: #e2ddd0;
    --danger: #dc3545;
    --success: #28a745;
}

* { box-sizing: border-box; }

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: var(--bg);
    color: var(--navy-light);
    margin: 0;
    padding: 0;
}

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

.admin-nav {
    background: var(--navy);
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-nav .brand { font-weight: 700; letter-spacing: 0.5px; color: var(--gold); font-size: 1.1rem; }
.admin-nav a, .admin-nav button { color: #fff; }
.admin-nav form { margin: 0; }

.admin-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.auth-wrap {
    max-width: 400px;
    margin: 60px auto;
    padding: 0 20px;
}

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

h1, h2, h3 { color: var(--navy); margin-top: 0; }

label { display: block; font-weight: 600; font-size: 0.85rem; margin: 14px 0 6px; color: var(--navy-light); }

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

textarea { resize: vertical; }

button, .btn {
    display: inline-block;
    background: var(--gold);
    color: #1a202c;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
}
button:hover, .btn:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: 5px 10px; font-size: 0.75rem; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.alert { padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fdeceb; color: var(--danger); border: 1px solid #f5c2c7; }
.alert-success { background: #eaf7ec; color: var(--success); border: 1px solid #c3e6cb; }

.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project-card h3 { margin-bottom: 4px; }
.project-card .slug { font-size: 0.8rem; color: #999; margin-bottom: 10px; display: block; }
.project-card .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

details.editor-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 4px 20px 4px;
}
details.editor-section[open] { padding-bottom: 20px; }
details.editor-section > summary {
    font-weight: 700;
    font-size: 1.05rem;
    padding: 16px 0;
    cursor: pointer;
    color: var(--navy);
}

.repeat-item { border: 1px dashed var(--border); border-radius: 8px; padding: 14px; margin-bottom: 12px; position: relative; }
.repeat-item .remove-row { position: absolute; top: 8px; right: 8px; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.image-grid .thumb { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fafafa; }
.image-grid .thumb img { width: 100%; height: 110px; object-fit: cover; display: block; }
.image-grid .thumb .thumb-actions { display: flex; justify-content: space-between; padding: 6px; gap: 4px; }

.gb-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.gb-item .gb-meta { font-size: 0.78rem; color: #999; }
.gb-item .gb-actions { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 700; }
.badge-pinned { background: #fff3cd; color: #856404; }
.badge-verified { background: #d1ecf1; color: #0c5460; }

.helper-text { font-size: 0.78rem; color: #999; margin-top: 4px; }
