* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

.admin-header {
    background: #1e293b;
    padding: 16px 32px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
}

.admin-header .actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover { background: #2563eb; }

.btn-success {
    background: #22c55e;
    color: #fff;
}

.btn-success:hover { background: #16a34a; }

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover { background: #dc2626; }

.admin-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Province row - full width */
.province-row {
    width: 100%;
}

/* Settings grid - 3 columns */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
}

.card h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row:last-child { margin-bottom: 0; }

.form-row label {
    width: 140px;
    min-width: 140px;
    font-size: 13px;
    color: #cbd5e1;
}

.form-row input[type="color"] {
    width: 48px;
    height: 36px;
    border: 2px solid #475569;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 2px;
}

.form-row input[type="number"],
.form-row input[type="text"],
.form-row select {
    flex: 1;
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #3b82f6;
}

.color-preview {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid #475569;
    flex-shrink: 0;
}

/* Preview bar (below header) */
.preview-bar {
    background: #000;
    border-bottom: 1px solid #334155;
    padding: 12px 24px;
}

.preview-bar .preview-frame {
    max-width: 1600px;
    margin: 0 auto;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    border: none;
}

.preview-bar .preview-frame iframe {
    width: 1920px;
    height: 80px;
    border: none;
    display: block;
    transform-origin: top left;
}


/* Accordion */
.accordion summary {
    cursor: pointer;
    list-style: none;
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary h3 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion summary h3::after {
    content: '\25B6';
    font-size: 10px;
    transition: transform 0.2s;
}

.accordion[open] summary h3::after {
    transform: rotate(90deg);
}

.accordion .province-grid {
    margin-top: 16px;
}

/* Province grid */
.province-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.province-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 8px;
    background: #0f172a;
    border-radius: 4px;
    cursor: pointer;
}

.province-grid label:hover {
    background: #1a2744;
}

.province-grid input[type="checkbox"] {
    accent-color: #3b82f6;
}

/* Status indicator */
.save-status {
    font-size: 12px;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.3s;
}

.save-status.visible { opacity: 1; }

/* Color with transparent checkbox */
.color-with-transparent {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transparent-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
    min-width: auto;
}

.transparent-label input[type="checkbox"] {
    accent-color: #3b82f6;
}

.form-row input[type="color"]:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
