/* =====================================================
   Variables
   ===================================================== */

* {
    box-sizing: border-box;
}

:root {
    --bg-deep: #07110b;
    --panel: rgba(12, 24, 18, 0.96);

    --text: #f3f1e7;
    --muted: #b7b4a8;
    --muted-dark: #7d8378;

    --green: #5f8b67;
    --green-dark: #2f4f36;
    --sage: #8da68c;

    --gold: #c7a86d;
    --cream: #f5f0df;

    --border: rgba(143, 161, 136, 0.28);
}


/* =====================================================
   Base
   ===================================================== */

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Montserrat', system-ui, sans-serif;
    color: var(--text);

    background:
        radial-gradient(circle at 20% 20%, rgba(64, 92, 68, 0.28) 0, transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(92, 70, 42, 0.18) 0, transparent 35%),
        linear-gradient(180deg, #08110b 0%, #050806 100%);
}

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.noise-overlay {
    pointer-events: none;
    position: fixed;
    inset: 0;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
    z-index: -1;
}


/* =====================================================
   Layout
   ===================================================== */

.page-shell {
    max-width: 1080px;
    margin: 2.5rem auto;
    padding: 0 1.5rem 2.5rem;
}

.page-shell.narrow {
    max-width: 720px;
}


/* =====================================================
   Cards
   ===================================================== */

.card,
.login-shell {
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    position: relative;
}

/* Let admin cards grow when lists get long */
.card {
    overflow: visible;
}

/* Keep login glow contained */
.login-shell {
    overflow: hidden;
}

.card::before,
.login-shell::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: conic-gradient(
        from 220deg,
        #6f8f72,
        #4d6b52,
        #b89b62,
        #6f8f72
    );
    opacity: 0.35;
    filter: blur(18px);
    z-index: -2;
}

.login-shell::before {
    opacity: 0.55;
    filter: blur(16px);
}

.login-shell::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 16px;
    background: radial-gradient(circle at top, #111827 0, #020617 60%);
    z-index: -1;
}

.card-inner {
    position: relative;
    z-index: 1;
    padding: 1.4rem 1.7rem 1.7rem;
    border-radius: 18px;
    background: radial-gradient(circle at top, #111827 0, #020617 60%);
    overflow: visible;
}

.card-inner.form-card {
    padding: 1.6rem 1.8rem 1.9rem;
}

.login-shell {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2.25rem 2.75rem;
}

/* =====================================================
   Header / Branding
   ===================================================== */

.top-bar,
.top-row,
.header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar,
.top-row {
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.header {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.brand,
.top-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        #fffdf6 0,
        #f5f0df 18%,
        #1b241d 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 20px rgba(111, 143, 114, 0.28);
    position: relative;
    overflow: hidden;
}

.login-shell .logo-circle {
    width: 46px;
    height: 46px;
    box-shadow: 0 0 18px rgba(111, 143, 114, 0.3);
}

.logo-circle::before {
    content: "";
    position: absolute;
    width: 90%;
    height: 2px;
    background: linear-gradient(90deg, #0f172a, #111827, #0f172a);
    transform: rotate(-25deg);
    opacity: 0.7;
}

.logo-icon {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #0f172a;
    background: linear-gradient(
    145deg,
    #6f8f72,
    #b89b62
);
}

.login-shell .logo-icon {
    width: 20px;
    height: 20px;
}

.logo-icon::before,
.logo-icon::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 70%;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    top: 15%;
}

.logo-icon::before {
    left: 6px;
}

.logo-icon::after {
    right: 6px;
    height: 55%;
}

.brand-text-main,
.title {
    font-size: 0.98rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.title {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.brand-text-sub,
.subtitle {
    font-size: 0.76rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.subtitle {
    font-size: 0.81rem;
    letter-spacing: 0.16em;
}

.title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}


/* =====================================================
   Typography
   ===================================================== */

.headline {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
}

.headline-wrap {
    margin-bottom: 1.2rem;
}

.subline,
.tagline,
.title-block p {
    color: var(--muted);
}

.subline {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
}

.tagline {
    font-size: 0.9rem;
    margin-bottom: 1.6rem;
}

.title-block h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.title-block p {
    margin: 0.25rem 0 0;
    font-size: 0.86rem;
}


/* =====================================================
   Buttons
   ===================================================== */

.btn-primary,
.btn-login {
    border: none;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #f5f0df;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.45),
        0 0 22px rgba(111, 143, 114, 0.28);
}

.btn-primary {
    padding: 0.62rem 1.1rem;
    font-size: 0.84rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-login {
    margin-top: 0.3rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out;
}

.btn-primary:hover,
.btn-login:hover {
    filter: brightness(1.05);
}

.btn-login:hover {
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.55),
        0 0 30px rgba(111, 143, 114, 0.42);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-logout,
.btn-back,
.action-link,
.action-delete {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: transparent;
    color: var(--muted);
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.btn-logout:hover {
    border-color: var(--red);
    color: #fecaca;
}

.btn-back:hover,
.action-link:hover {
    border-color: var(--cyan);
    color: #e0f2fe;
}

.action-link,
.action-delete {
    font-size: 0.75rem;
    padding: 0.18rem 0.6rem;
}

.action-delete {
    border-color: rgba(248, 113, 113, 0.8);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.25);
}

.action-delete:hover {
    border-color: #ef4444;
    background: rgba(127, 29, 29, 0.5);
}


/* =====================================================
   Forms
   ===================================================== */

form {
    margin-top: 0.8rem;
}

.login-shell form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0;
}

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

.field-block {
    margin-bottom: 0.9rem;
}

.field-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.field {
    position: relative;
}

.field input,
.field-input,
.field-textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: radial-gradient(circle at top left, #111827, #020617);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input {
    padding: 0.75rem 0.9rem 0.75rem 2.4rem;
    border-radius: 999px;
    color: #f9fafb;
}

.field-input,
.field-textarea {
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
}

.field input::placeholder,
.field-input::placeholder,
.field-textarea::placeholder {
    color: var(--muted-dark);
}

.field input:focus,
.field-input:focus,
.field-textarea:focus {
    border-color: var(--cyan);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.65),
        0 0 24px rgba(56, 189, 248, 0.35);
    background: radial-gradient(circle at top left, #0b1120, #020617);
}

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

.field-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.8;
    pointer-events: none;
}

.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.3rem 0 1.2rem;
    font-size: 0.82rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}


/* =====================================================
   Messages / Alerts
   ===================================================== */

.success-banner {
    margin-bottom: 0.9rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.error,
.errors {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #fecaca;
    font-size: 0.8rem;
}

.error {
    margin-top: 0.7rem;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.errors {
    margin: 0.6rem 0 0.9rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
}

.errors ul {
    margin: 0.2rem 0 0;
    padding-left: 1.1rem;
}

.error-icon {
    font-size: 0.95rem;
}


/* =====================================================
   Dashboard
   ===================================================== */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.toolbar-left,
.section-count {
    font-size: 0.78rem;
    color: var(--muted-dark);
}

.section {
    margin-bottom: 1.45rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.gigs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}

.gigs-list {
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(31, 41, 55, 0.95);
    padding: 0.5rem 0.2rem 0.3rem;
    overflow: visible;
}

.gigs-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gig-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 0.75rem 0.95rem;
    font-size: 0.85rem;
    align-items: center;
}

.gig-row + .gig-row {
    border-top: 1px solid rgba(143, 161, 136, 0.18);
}

.gig-date {
    font-weight: 600;
}

.gig-date span {
    display: block;
}

.gig-date .month {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.gig-date .day {
    font-size: 1.15rem;
}

.gig-main {
    overflow: hidden;
}

.gig-venue {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.gig-city {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.08rem;
}

.gig-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
    font-size: 0.8rem;
}

.gig-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.gig-meta .gig-actions {
    justify-content: flex-end;
    align-items: center;
}

.gig-actions form {
    margin: 0;
}

.badge {
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.55);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.badge-live {
    border-color: rgba(52, 211, 153, 0.8);
    color: #a7f3d0;
}

.badge-draft {
    border-color: rgba(248, 113, 113, 0.8);
    color: #fecaca;
}

.gig-link a {
    color: var(--blue);
    text-decoration: none;
}

.gig-link a:hover {
    text-decoration: underline;
}

.empty-state {
    padding: 0.8rem 1rem 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.empty-state strong {
    color: var(--text);
}


/* =====================================================
   Status / Meta
   ===================================================== */

.user-pill {
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #d1d5db;
}

.user-dot,
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
    font-size: 0.78rem;
    color: var(--muted-dark);
}

.meta-left {
    display: flex;
    align-items: center;
}

.meta .status-dot {
    margin-right: 0.35rem;
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 640px) {

    /* General layout */

    .page-shell {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    .card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .card-inner {
        padding: 1.2rem 1rem 2rem;
    }

    /* Login */

    body.login-page {
        align-items: flex-start;
    }

    .login-shell {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0;
        padding: 2rem 1rem 2.5rem;
        box-shadow: none;
    }

    /* Top bars */

    .top-bar,
    .top-row,
    .toolbar,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Dashboard gigs */

    .gig-row {
        padding: 0.75rem 1rem;
        grid-template-columns:
            70px
            minmax(0, 2.5fr)
            minmax(0, 1fr);
    }

    .gig-meta {
        align-items: flex-start;
    }

    .gig-actions {
        justify-content: flex-start;
    }

    /* Forms */

    .grid-two {
        grid-template-columns: 1fr;
    }

    .options-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .headline {
        font-size: 1.25rem;
    }
}