/* ═══════════════════════════════════════════════════════
   Back Pocket Mixtape Studio — Shared Design System
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --pink: #f63757;
    --pink-light: #ff6b84;
    --dark: #2a2828;
    --cream: #f7f4ee;
    --gold: #c9a84c;
    --teal: #4a9c8c;
    --purple: #6b5ce7;
    --orange: #e67e22;
    --red: #dc3545;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-pink: 0 4px 16px rgba(246, 55, 87, 0.25);

    /* Borders */
    --border-light: 1px solid rgba(42, 40, 40, 0.06);
    --border-med: 1px solid rgba(42, 40, 40, 0.1);
    --border-input: 2px solid rgba(42, 40, 40, 0.12);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}


/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ── Body ── */
body {
    font-family: 'Times New Roman', 'Georgia', serif;
    letter-spacing: -0.5px;
    background: var(--cream);
    color: var(--dark);
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
    font-size: 16px;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--pink);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--pink-light);
}


/* ── Layout Containers ── */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    position: relative;
    z-index: 1;
}

.container-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    position: relative;
    z-index: 1;
}

.container-narrow {
    max-width: 440px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    position: relative;
    z-index: 1;
}


/* ── Typography ── */
.font-label {
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.font-handwritten {
    font-family: 'Kalam', cursive;
}

.font-ui {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
}

h1, h2, h3, h4 {
    font-family: 'Times New Roman', 'Georgia', serif;
    letter-spacing: -1px;
    line-height: 1.2;
}

h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

small {
    font-size: 0.85rem;
}


/* ── Masthead ── */
.masthead {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: var(--border-med);
}

.masthead h1 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.1;
}

.masthead h1 .pink {
    color: var(--pink);
}

.masthead .subtitle {
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.75rem;
    color: var(--gold);
    margin-top: 0.25rem;
}

/* Compact masthead for auth pages */
.masthead-compact {
    text-align: center;
    margin-bottom: 2rem;
}

.masthead-compact h1 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.masthead-compact h1 .pink {
    color: var(--pink);
}

.masthead-compact .subtitle {
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.65rem;
    color: var(--gold);
    margin-top: 0.3rem;
}


/* ── Screen Management ── */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s var(--ease-out);
}


/* ── Cards ── */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: var(--border-light);
}

.card-elevated {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: var(--border-light);
}


/* ── Buttons ── */
.btn {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 2rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1;
}

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

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* Pink solid */
.btn-pink {
    background: var(--pink);
    color: white;
}

.btn-pink:hover {
    background: var(--pink-light);
    box-shadow: var(--shadow-pink);
}

/* Dark solid */
.btn-dark {
    background: var(--dark);
    color: white;
}

.btn-dark:hover {
    background: #3d3a3a;
}

/* Gold solid */
.btn-gold {
    background: var(--gold);
    color: white;
}

.btn-gold:hover {
    background: #d4a83d;
}

/* Teal solid */
.btn-teal {
    background: var(--teal);
    color: white;
}

.btn-teal:hover {
    background: #5ab29f;
}

/* Outline */
.btn-outline {
    background: white;
    color: var(--dark);
    border: 2px solid rgba(42, 40, 40, 0.12);
}

.btn-outline:hover {
    border-color: var(--pink);
    color: var(--pink);
}

/* Ghost (no border) */
.btn-ghost {
    background: transparent;
    color: var(--dark);
    padding: 0.75rem 1rem;
}

.btn-ghost:hover {
    background: rgba(42, 40, 40, 0.04);
}

/* Size modifiers */
.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 1.15rem 2.5rem;
    font-size: 1.05rem;
    border-radius: 14px;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}


/* ── Form Inputs ── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.65rem;
    color: rgba(42, 40, 40, 0.5);
    margin-bottom: 0.4rem;
}

.input {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 2px solid rgba(42, 40, 40, 0.1);
    background: transparent;
    color: var(--dark);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
}

.input:focus {
    border-bottom-color: var(--pink);
    background: rgba(246, 55, 87, 0.02);
}

.input::placeholder {
    color: rgba(42, 40, 40, 0.3);
    font-style: italic;
}

/* Boxed input variant (with full border) */
.input-boxed {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    border: var(--border-input);
    background: white;
    color: var(--dark);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
}

.input-boxed:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(246, 55, 87, 0.08);
}

.input-boxed::placeholder {
    color: rgba(42, 40, 40, 0.3);
    font-style: italic;
}

/* Textarea */
.textarea {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    border: var(--border-input);
    background: white;
    color: var(--dark);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.textarea:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(246, 55, 87, 0.08);
}

/* Select */
.select {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    border: var(--border-input);
    background: white;
    color: var(--dark);
    border-radius: var(--radius-md);
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232a2828' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.select:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(246, 55, 87, 0.08);
}

/* Error state */
.input-error {
    border-color: var(--red) !important;
}

.form-error {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: var(--red);
    margin-top: 0.3rem;
    letter-spacing: 0;
}

/* Inline error/alert box */
.alert {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    display: none;
    line-height: 1.4;
}

.alert.visible {
    display: block;
    animation: fadeIn 0.3s var(--ease-out);
}

.alert-error {
    background: rgba(220, 53, 69, 0.08);
    color: var(--red);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

.alert-success {
    background: rgba(74, 156, 140, 0.08);
    color: var(--teal);
    border: 1px solid rgba(74, 156, 140, 0.15);
}

.alert-warning {
    background: rgba(201, 168, 76, 0.1);
    color: #9a7d2e;
    border: 1px solid rgba(201, 168, 76, 0.2);
}


/* ── Tab Navigation ── */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(42, 40, 40, 0.06);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-nav a,
.tab-nav button {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(42, 40, 40, 0.45);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.15s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-nav a:hover,
.tab-nav button:hover {
    color: var(--dark);
}

.tab-nav a.active,
.tab-nav button.active {
    color: var(--pink);
    border-bottom-color: var(--pink);
    font-weight: 600;
}


/* ── Badges / Tags ── */
.badge {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    line-height: 1.4;
    text-transform: uppercase;
}

.badge-pink {
    background: rgba(246, 55, 87, 0.1);
    color: var(--pink);
}

.badge-urgent, .badge-red {
    background: rgba(220, 53, 69, 0.1);
    color: var(--red);
}

.badge-approved, .badge-teal {
    background: rgba(74, 156, 140, 0.1);
    color: var(--teal);
}

.badge-pending, .badge-gold {
    background: rgba(201, 168, 76, 0.12);
    color: #9a7d2e;
}

.badge-purple {
    background: rgba(107, 92, 231, 0.1);
    color: var(--purple);
}

.badge-dark {
    background: var(--dark);
    color: var(--cream);
    font-family: 'Special Elite', monospace;
    letter-spacing: 2px;
    font-size: 0.6rem;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
}


/* ── Calendar Grid ── */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(42, 40, 40, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cal-header {
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.6rem;
    color: rgba(42, 40, 40, 0.4);
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: rgba(42, 40, 40, 0.02);
}

.cal-day {
    background: white;
    min-height: 80px;
    padding: 0.4rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0;
    position: relative;
}

.cal-day-num {
    font-weight: 600;
    font-size: 0.7rem;
    color: rgba(42, 40, 40, 0.4);
    margin-bottom: 0.2rem;
}

.cal-day.today .cal-day-num {
    color: var(--pink);
    font-weight: 700;
}

.cal-day.outside {
    opacity: 0.3;
}

.cal-entry {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-weight: 500;
}

.cal-entry-pink {
    background: rgba(246, 55, 87, 0.12);
    color: var(--pink);
}

.cal-entry-teal {
    background: rgba(74, 156, 140, 0.12);
    color: var(--teal);
}

.cal-entry-purple {
    background: rgba(107, 92, 231, 0.12);
    color: var(--purple);
}

.cal-entry-gold {
    background: rgba(201, 168, 76, 0.15);
    color: #9a7d2e;
}


/* ── Divider ── */
.divider {
    border: none;
    border-top: var(--border-med);
    margin: 1.5rem 0;
}


/* ── Utility Classes ── */
.hidden { display: none !important; }

.text-muted { color: rgba(42, 40, 40, 0.45); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-pink { color: var(--pink); }
.text-teal { color: var(--teal); }
.text-gold { color: var(--gold); }
.text-purple { color: var(--purple); }
.text-red { color: var(--red); }
.text-dark { color: var(--dark); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }


/* ── Keyframe Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.04); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* ── Footer ── */
.footer-brand {
    text-align: center;
    padding: 2rem 0 1rem;
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.6rem;
    color: rgba(42, 40, 40, 0.25);
}


/* ── Responsive ── */
@media (max-width: 640px) {
    .container,
    .container-wide {
        padding: 1.5rem 1rem;
    }

    .container-narrow {
        padding: 1.5rem 1rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.35rem; }

    .masthead h1 { font-size: 2rem; }
    .masthead-compact h1 { font-size: 1.5rem; }

    .card { padding: 1.25rem; }
    .card-elevated { padding: 1.75rem; }

    .btn { padding: 0.85rem 1.5rem; font-size: 0.9rem; }
    .btn-lg { padding: 1rem 2rem; font-size: 0.95rem; }

    .tab-nav a,
    .tab-nav button {
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
    }

    .cal-grid {
        font-size: 0.65rem;
    }

    .cal-day {
        min-height: 60px;
    }
}

@media (max-width: 420px) {
    .masthead h1 { font-size: 1.75rem; }
    .masthead-compact h1 { font-size: 1.35rem; }
    .card-elevated { padding: 1.5rem; }
}
