/* Gingers Dashboard Styles - Branded Version */
/* Brand: Gingers Catering Hong Kong - Since 2001 */
/* Logo: Gold text (#C9A961) on black, elegant serif */

:root {
    /* Gingers Brand Colors */
    --gingers-gold: #C9A961;
    --gingers-gold-light: #D4B872;
    --gingers-gold-dark: #A88A4D;
    --gingers-black: #1A1A1A;
    --gingers-black-light: #2D2D2D;
    --gingers-cream: #F5F0E8;
    --gingers-warm: #F9F7F4;
    --gingers-accent: #8B6914;

    /* Semantic Colors */
    --primary: var(--gingers-gold);
    --primary-dark: var(--gingers-gold-dark);
    --primary-light: var(--gingers-gold-light);
    --secondary: var(--gingers-black);
    --secondary-light: var(--gingers-black-light);
    --background: var(--gingers-warm);
    --surface: #FFFFFF;
    --success: #4A7C59;
    --danger: #C44D4D;
    --warning: #F5A623;
    --info: #5B7A91;

    /* Text Colors */
    --text-primary: var(--gingers-black);
    --text-secondary: #5C5C5C;
    --text-muted: #8A8A8A;
    --text-on-dark: #FFFFFF;
    --text-on-gold: var(--gingers-black);

    /* Neutrals */
    --gray: #6c757d;
    --gray-light: #E8E4DC;
    --gray-lighter: var(--gingers-cream);
    --border: #D9D4CC;
    --border-light: #EDE9E3;

    /* Missing variable aliases — used by pages.css */
    --bg-secondary: var(--gingers-cream);
    --bg-tertiary: var(--gray-light);
    --border-color: var(--border);

    /* Shadows - warmer tone */
    --shadow: 0 2px 8px rgba(26, 26, 26, 0.08);
    --shadow-lg: 0 4px 20px rgba(26, 26, 26, 0.12);
    --shadow-gold: 0 2px 12px rgba(201, 169, 97, 0.25);

    /* Typography - Gingers Brand Fonts */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    --font-heading: var(--font-primary);
    --font-body: var(--font-primary);

    /* Button system */
    --btn-radius: 4px;
    --btn-font-size: 12px;
    --btn-padding: 6px 14px;
    --btn-font-weight: 500;

    /* Stage badge colours */
    --badge-inquiry: #5B7FA6;
    --badge-quotation: #8B6914;
    --badge-confirmation: #5A7A5A;
    --badge-booked: #2E6B4F;
    --badge-rejected: #8B4444;
}

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

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Headings - minimal, all caps, ultra-light */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Logo styling - minimal and light */
.logo h1 {
    font-family: var(--font-primary);
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* Header - Modern Clean White Design */
.header {
    background: var(--surface);
    border-bottom: 2px solid var(--gingers-gold);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-family: var(--font-primary);
}

/* Logo styling - gold logo on white background */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
    /* Show original gold logo - no filter */
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gingers-black);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--gingers-black);
    cursor: pointer;
    border-radius: 0;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-weight: 300;
    font-family: var(--font-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
}

.nav-btn:hover {
    background: transparent;
    color: var(--gingers-black);
}

.nav-btn:hover::after,
.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 1px;
    background: var(--gingers-gold);
}

.nav-btn.active {
    background: transparent;
    color: var(--gingers-gold-dark);
    font-weight: 300;
}

/* ============================================================
   UNIFIED BUTTON SYSTEM
   ============================================================ */

.btn {
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gingers-gold);
    color: #FFFFFF;
    border-color: var(--gingers-gold);
}

.btn-primary:hover {
    background: #A88A4D;
    border-color: #A88A4D;
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--gingers-black);
    border-color: var(--border);
}

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

.btn-ghost {
    background: transparent;
    color: #666;
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--gingers-black);
}

.btn-danger {
    background: #FFFFFF;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #FFFFFF;
}

.btn-success {
    background: #FFFFFF;
    color: #2E6B4F;
    border-color: #2E6B4F;
}

.btn-success:hover {
    background: #2E6B4F;
    color: #FFFFFF;
}

.btn-warning {
    background: #FFFFFF;
    color: #7A5C00;
    border-color: #C9A020;
}

.btn-warning:hover {
    background: #FFF3CD;
}

/* .btn-sm is an alias — inherits .btn sizing (already small) */
.btn-sm {
    /* inherits .btn — no additional overrides needed */
}

/* .btn-x — delete row button in modules, kept as-is */
.btn-x {
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-x:hover {
    background: #a83838;
}

/* Disabled state */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   STAGE TABS
   ============================================================ */

.stage-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.stage-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.stage-tab.active {
    color: var(--gingers-black);
    border-bottom-color: var(--gingers-gold);
    font-weight: 600;
}

.stage-tab .tab-count {
    font-size: 11px;
    background: #f0f0f0;
    color: #666;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

.stage-tab.active .tab-count {
    background: var(--gingers-gold);
    color: white;
}

/* ============================================================
   STAGE BADGES
   ============================================================ */

.stage-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: inline-block;
}

.stage-badge.badge-inquiry {
    background: #EBF0F7;
    color: var(--badge-inquiry);
}

.stage-badge.badge-quotation {
    background: #FBF5E0;
    color: var(--badge-quotation);
}

.stage-badge.badge-confirmation {
    background: #EDF2ED;
    color: var(--badge-confirmation);
}

.stage-badge.badge-booked {
    background: #E0F0EB;
    color: var(--badge-booked);
}

.stage-badge.badge-rejected {
    background: #F5EDED;
    color: var(--badge-rejected);
}

.stage-badge.badge-urgent {
    background: #FFF0E0;
    color: #C05000;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes just-updated-glow {
    0%   { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.0); }
    20%  { box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.5); }
    100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.0); }
}

.just-updated {
    animation: just-updated-glow 2s ease-out;
}

/* ============================================================
   UTILITY
   ============================================================ */

.hidden {
    display: none !important;
}

.view.hidden {
    display: none !important;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main {
    padding: 1.5rem 2rem;
    min-height: calc(100vh - 73px);
}

/* ============================================================
   KANBAN BOARD
   ============================================================ */

.kanban {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    overflow-x: auto;
}

.kanban-column {
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.kanban-column.disabled {
    opacity: 0.5;
    background: var(--gray-lighter);
}

.column-header {
    padding: 1rem;
    border-bottom: 2px solid var(--border-light);
    background: var(--gingers-cream);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gingers-black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.count {
    background: var(--gingers-gold);
    color: var(--gingers-black);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge {
    background: var(--gingers-black-light);
    color: var(--gingers-cream);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.column-content {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.column-content.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-text {
    color: var(--gray);
    font-style: italic;
    font-size: 0.9rem;
}

/* ============================================================
   EVENT CARDS
   ============================================================ */

.event-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.05);
}

.event-card:hover {
    box-shadow: var(--shadow-gold);
    border-color: var(--gingers-gold);
    transform: translateY(-2px);
}

.event-card h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--gingers-black);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.event-meta {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ============================================================
   MODALS
   ============================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-large {
    max-width: 800px;
}

.modal-xlarge {
    max-width: 1100px;
    width: 95%;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--gingers-gold);
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 0.9rem;
    color: var(--gingers-black);
    font-family: var(--font-primary);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gingers-black);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--gingers-gold);
}

/* ============================================================
   FORMS
   ============================================================ */

form {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-size: 0.8rem;
    color: var(--gingers-black);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gingers-gold);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 300;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gingers-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================================
   SETTINGS
   ============================================================ */

.settings {
    max-width: 600px;
}

.settings h2 {
    margin-bottom: 1.5rem;
    color: var(--gingers-black);
    font-family: var(--font-heading);
}

.settings-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.settings-section h3 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--gingers-black);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.setting-item input,
.setting-item select,
.setting-item textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    background: var(--gingers-warm);
}

.setting-item textarea {
    min-height: 80px;
    resize: vertical;
}

/* ============================================================
   PLACEHOLDER SECTIONS
   ============================================================ */

.placeholder-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.placeholder-section h2 {
    color: var(--gingers-black);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.placeholder-note {
    color: var(--gingers-gold-dark);
    font-style: italic;
    padding: 1rem;
    background: var(--gingers-cream);
    border: 1px solid var(--gingers-gold);
    border-radius: 4px;
}

/* ============================================================
   EVENT ACTIONS
   ============================================================ */

.event-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background: var(--gingers-black);
    border-top: 3px solid var(--gingers-gold);
    padding: 3rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: var(--gingers-cream);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.footer-contact {
    text-align: right;
    color: var(--gingers-cream);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.footer-contact p {
    margin-bottom: 0.25rem;
}

.footer-tagline {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gingers-black-light);
}

.footer-tagline p {
    color: var(--gingers-gold);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============================================================
   CONFIG BANNER
   ============================================================ */

.config-banner {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-bottom: 2px solid var(--gingers-gold);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.config-banner strong {
    color: var(--gingers-accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .kanban {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .kanban {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }
}
