:root {
    --bg-main: #FFF6EF;
    --bg-peach: #F9DCCB;
    --card-bg: #FFFFFF;
    --accent-orange: #F47732;
    --accent-orange-dark: #DC5F1B;
    --accent-soft: #FCE7DA;
    --text-primary: #3F3029;
    --text-secondary: #9A8275;
    --border-soft: rgba(63, 48, 41, 0.12);
    --status-green: #16B875;
    --status-red: #DC2626;
    --font-serif: 'Lora', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-main);
    background-image: linear-gradient(180deg, #FFF6EF 0%, #FCECE1 60%, #F9DCCB 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Login Page */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px 26px;
    box-shadow: 0 14px 36px rgba(63, 48, 41, 0.09);
}

.auth-logo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #FFFFFF;
    padding: 6px;
    margin: 0 auto 14px;
    box-shadow: 0 6px 18px rgba(63, 48, 41, 0.12);
}

.auth-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.auth-title {
    margin: 0 0 6px;
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}

.auth-subtitle {
    margin: 0 0 22px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

/* Admin Topbar & Container */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(63, 48, 41, 0.08);
}

.admin-topbar-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.admin-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
}

.admin-brand-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-brand-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-shell {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 20px 56px;
}

/* Alerts */
.alert-box {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}

.alert-success {
    background: #E8FAF0;
    border: 1px solid rgba(22, 184, 117, 0.3);
    color: #0F7A4D;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid rgba(220, 38, 38, 0.28);
    color: #B91C1C;
}

.alert-error ul {
    margin: 6px 0 0;
    padding-left: 18px;
    font-weight: 500;
}

/* Cards & Grid */
.panel-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 22px 22px;
    box-shadow: 0 4px 20px rgba(63, 48, 41, 0.055);
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(63, 48, 41, 0.08);
}

.panel-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-desc {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.live-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.live-status-chip.open {
    background: #E8FAF0;
    color: var(--status-green);
}

.live-status-chip.closed {
    background: #FEF2F2;
    color: var(--status-red);
}

.live-status-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.form-hint {
    font-size: 11.8px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border-radius: 13px;
    border: 1.5px solid var(--border-soft);
    background: #FFFCFA;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.form-control:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(244, 119, 50, 0.15);
}

textarea.form-control {
    min-height: 92px;
    resize: vertical;
    line-height: 1.5;
}

/* Status Radio Cards */
.status-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.status-radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 15px;
    border: 1.5px solid var(--border-soft);
    background: #FFFCFA;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.status-radio-card input[type="radio"] {
    accent-color: var(--accent-orange);
    width: 17px;
    height: 17px;
}

.status-radio-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
}

.status-radio-sub {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Image Upload Preview Box */
.media-preview-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: #FFF9F5;
    border: 1px dashed rgba(244, 119, 50, 0.35);
}

.preview-thumb-logo {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: contain;
    background: #FFFFFF;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(63, 48, 41, 0.1);
    flex-shrink: 0;
}

.preview-thumb-banner {
    width: 116px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--accent-soft);
    box-shadow: 0 4px 12px rgba(63, 48, 41, 0.1);
    flex-shrink: 0;
}

.media-upload-controls {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.2px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Social Group Subcard */
.social-edit-block {
    border: 1px solid rgba(63, 48, 41, 0.09);
    border-radius: 16px;
    padding: 16px;
    background: #FFFDFB;
}

.social-edit-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13.8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-orange);
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(244, 119, 50, 0.25);
}

.btn-primary:hover {
    background: var(--accent-orange-dark);
}

.btn-secondary {
    background: #F6EFEA;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #EDE1D8;
}

.btn-outline {
    background: #FFFFFF;
    border: 1.5px solid var(--border-soft);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange-dark);
}

.btn-block {
    width: 100%;
}

.sticky-save-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .form-grid,
    .status-options {
        grid-template-columns: 1fr;
    }

    .panel-card {
        padding: 18px 16px;
    }

    .admin-shell {
        padding: 18px 16px 44px;
    }

    .media-preview-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .sticky-save-bar .btn {
        width: 100%;
    }
}

