/* TipMeHat — Estilos globales */
:root {
    --green:       #3ecf5a;
    --green-dark:  #2eaa47;
    --black:       #0a0a0a;
    --gray-dark:   #1a1a1a;
    --gray:        #2d2d2d;
    --gray-mid:    #555;
    --gray-light:  #bbb;
    --white:       #ffffff;
    --radius:      12px;
    --radius-sm:   8px;
    --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- LOGO --- */
.logo-img,
.logo-img-sm,
.logo-img-lg {
    display: block;
    width: auto;
}
.logo-img    { height: 32px; }
.logo-img-sm { height: 24px; }
.logo-img-lg { height: 48px; margin: 0 auto 12px; }

/* --- LAYOUT --- */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- TIPPAGE (lo que ve el cliente al escanear) --- */
.tip-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: var(--black);
}

.tip-artist-photo {
    width: 100%;
    max-width: 340px;
    height: 400px;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius);
    display: block;
    margin-bottom: 16px;
}

.tip-artist-photo-placeholder {
    width: 100%;
    max-width: 340px;
    height: 280px;
    background: var(--gray);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 16px;
}

.tip-artist-name {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}

.tip-artist-genre {
    font-size: 14px;
    color: var(--gray-light);
    text-align: center;
    margin-bottom: 6px;
}

.tip-artist-instagram {
    font-size: 13px;
    color: var(--green);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tip-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin-bottom: 12px;
}

.tip-btn {
    background: var(--gray);
    border: 2px solid var(--gray);
    color: var(--white);
    border-radius: var(--radius);
    padding: 18px 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: center;
}

.tip-btn:hover, .tip-btn.active {
    border-color: var(--green);
    background: rgba(62,207,90,.1);
    color: var(--green);
}

.tip-custom {
    width: 100%;
    max-width: 340px;
    margin-bottom: 24px;
}

.tip-custom input {
    width: 100%;
    padding: 14px 16px;
    background: var(--gray);
    border: 2px solid var(--gray);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 18px;
    text-align: center;
    transition: border-color .15s;
}

.tip-custom input:focus {
    outline: none;
    border-color: var(--green);
}

.tip-custom input::placeholder { color: var(--gray-mid); }

.btn-pay {
    width: 100%;
    max-width: 340px;
    padding: 18px;
    background: var(--green);
    color: var(--black);
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-pay:hover { background: var(--green-dark); }
.btn-pay:active { transform: scale(.98); }
.btn-pay:disabled { opacity: .5; cursor: not-allowed; }

.tip-fee-note {
    font-size: 12px;
    color: var(--gray-mid);
    text-align: center;
    margin-top: 12px;
    max-width: 300px;
}

.tip-logo {
    margin-top: 40px;
    font-size: 13px;
    color: var(--gray-mid);
    text-align: center;
}

.tip-logo span { color: var(--green); font-weight: 700; }

/* --- GRACIAS PAGE --- */
.thanks-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.thanks-icon {
    font-size: 72px;
    margin-bottom: 24px;
}

.thanks-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 8px;
}

.thanks-name {
    font-size: 22px;
    color: var(--gray-light);
    margin-bottom: 32px;
}

/* --- AUTH PAGES --- */
.auth-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--gray-dark);
    border-radius: var(--radius);
    padding: 40px 32px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
}

.auth-logo h1 span { color: var(--green); }

.auth-logo p {
    font-size: 13px;
    color: var(--gray-light);
    margin-top: 6px;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--gray);
    border: 1px solid #3a3a3a;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 15px;
    font-family: var(--font);
    transition: border-color .15s;
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
}

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

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--green);
    color: var(--black);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    margin-top: 8px;
}

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

.btn-secondary {
    padding: 10px 20px;
    background: transparent;
    color: var(--green);
    border: 1.5px solid var(--green);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover { background: rgba(62,207,90,.1); text-decoration: none; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-error   { background: rgba(255,80,80,.15); color: #ff8080; border: 1px solid rgba(255,80,80,.3); }
.alert-success { background: rgba(62,207,90,.15); color: var(--green); border: 1px solid rgba(62,207,90,.3); }

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-mid);
}

/* --- DASHBOARD --- */
.dashboard {
    min-height: 100dvh;
    padding: 0 0 60px;
}

.dash-nav {
    background: var(--gray-dark);
    border-bottom: 1px solid var(--gray);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-nav-logo {
    font-size: 18px;
    font-weight: 800;
}

.dash-nav-logo span { color: var(--green); }

.dash-nav-user {
    font-size: 13px;
    color: var(--gray-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-content {
    padding: 32px 24px;
    max-width: 900px;
    margin: 0 auto;
}

.dash-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dash-subtitle {
    color: var(--gray-light);
    font-size: 14px;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-mid);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--green);
}

.stat-sub {
    font-size: 12px;
    color: var(--gray-mid);
    margin-top: 4px;
}

.section-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.section-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.tip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray);
    font-size: 15px;
}

.tip-row:last-child { border-bottom: none; }
.tip-row-amount { font-weight: 700; color: var(--green); }
.tip-row-meta { font-size: 12px; color: var(--gray-mid); }

/* --- QR PAGE --- */
.qr-section {
    text-align: center;
}

.qr-section img.qr-code {
    width: 200px;
    height: 200px;
    border-radius: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    display: block;
    margin: 0;
}

.qr-url {
    font-size: 13px;
    color: var(--gray-light);
    background: var(--gray);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 16px;
    word-break: break-all;
}

/* --- Dashboard: profile header + collapsible sections --- */
.dash-profile-header {
    text-align: center;
    margin-bottom: 28px;
}

.dash-profile-photo {
    width: 115.2px;
    height: 115.2px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green);
    margin-bottom: 12px;
}

.dash-profile-name {
    font-size: 21.6px;
    font-weight: 800;
    margin-bottom: 2px;
}

.dash-profile-genre {
    font-size: 15.6px;
    color: var(--gray-light);
    margin-bottom: 4px;
}

.dash-profile-ig {
    font-size: 15.6px;
    color: var(--green);
}

.dash-accordion-item {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.dash-accordion-item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: .05em;
}

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

.dash-accordion-item summary:hover { color: var(--green); }

.dash-accordion-summary-right {
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: none;
    letter-spacing: normal;
}

.dash-accordion-chevron {
    color: var(--green);
    font-size: 36px;
    line-height: 1;
    transition: transform .2s;
}

.dash-accordion-item[open] .dash-accordion-chevron { transform: rotate(180deg); }

.dash-accordion-body {
    padding: 4px 20px 20px;
    border-top: 1px solid var(--gray);
    padding-top: 16px;
    font-size: 14px;
}

.visually-hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.profile-photo-box .file-upload-trigger {
    display: inline-block;
    padding: 7px 16px;
    background: #e8e8e8;
    color: var(--green);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
}

.profile-photo-box .file-upload-trigger:hover { background: #ddd; }

/* --- ARTWORK CARD (Promo Materials / mydesign.php) --- */
.artwork-card {
    background: #fff;
    color: #1a1a1a;
    border-radius: var(--radius-sm);
    padding: 44px 80px;
    max-width: 460px;
    aspect-ratio: 8.5 / 14;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.artwork-logo { width: 90%; margin: 0 auto 20px; display: block; }
.artwork-qr   { width: 75%; margin: 0 auto 20px; display: block; }
.artwork-photo {
    width: 75%; height: 0; padding-top: 75%;
    position: relative;
    margin: 0 auto 20px;
    border-radius: var(--radius); overflow: hidden;
    background: #1a1a1a;
}
.artwork-photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.artwork-photo-empty { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #fff; }
.artwork-name  { font-size: 26px; font-weight: 900; color: var(--green); margin-bottom: 4px; }
.artwork-genre { font-size: 15px; color: #1a1a1a; margin-bottom: 4px; }
.artwork-ig    { font-size: 12px; color: #555; margin-bottom: 2px; }
.artwork-url   { font-size: 11px; color: #999; }

/* --- MY SHOWS (mis-shows.php / dashboard) --- */
.show-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray);
}
.show-card:last-child { border-bottom: none; }
.show-date-box {
    background: var(--green);
    color: var(--black);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    flex-shrink: 0;
    min-width: 56px;
}
.show-date-box .month { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.show-date-box .day   { font-size: 24px; font-weight: 900; line-height: 1; }
.show-info { flex: 1; min-width: 0; }
.show-venue { font-size: 15px; font-weight: 700; }
.show-meta  { font-size: 12px; color: var(--gray-light); margin-top: 2px; }
.show-notes { font-size: 12px; color: var(--gray-mid); margin-top: 2px; font-style: italic; }
.show-delete {
    background: none;
    border: 1px solid #3a3a3a;
    color: var(--gray-mid);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    flex-shrink: 0;
}
.show-delete:hover { border-color: #ff8080; color: #ff8080; }
.add-form { display: none; }
.add-form.open { display: block; }
.venue-link-icon { color: var(--gray-mid); transition: color .15s; line-height: 0; }
.venue-link-icon:hover { color: var(--green); }
.past-show { opacity: .5; }

/* --- LANDING PAGE --- */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
}

.landing-logo span { color: var(--green); }

.hero {
    text-align: center;
    padding: 80px 24px 16px;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero h1 span { color: var(--green); }

.hero p {
    font-size: 18px;
    color: var(--gray-light);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    padding: 16px 32px;
    background: var(--green);
    color: var(--black);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background .15s;
}

.btn-cta:hover { background: var(--green-dark); text-decoration: none; }

.btn-cta-ghost {
    padding: 16px 32px;
    background: transparent;
    color: var(--white);
    border: 1.5px solid var(--gray);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: border-color .15s;
}

.btn-cta-ghost:hover { border-color: var(--green); color: var(--green); text-decoration: none; }

.features {
    padding: 60px 24px;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    padding: 28px;
}

.feature-icon { font-size: 32px; margin-bottom: 12px; }

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p { font-size: 14px; color: var(--gray-light); line-height: 1.6; }

.pricing {
    padding: 60px 24px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.pricing h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pricing p {
    color: var(--gray-light);
    margin-bottom: 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    text-align: left;
}

.pricing-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: var(--radius);
    padding: 28px;
}

.pricing-card.featured {
    border-color: var(--green);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: var(--black);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.pricing-plan { font-size: 13px; color: var(--gray-mid); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.pricing-price { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.pricing-price span { font-size: 14px; font-weight: 400; color: var(--gray-light); }
.pricing-features { list-style: none; margin: 20px 0; }
.pricing-features li { font-size: 14px; color: var(--gray-light); padding: 6px 0; display: flex; gap: 8px; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* --- ONBOARDING --- */
.onboarding {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.onboarding-card {
    width: 100%;
    max-width: 500px;
    background: var(--gray-dark);
    border-radius: var(--radius);
    padding: 40px 32px;
}

.step-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: center;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray);
}

.step-dot.active { background: var(--green); }
.step-dot.done   { background: var(--green-dark); }

/* --- RESPONSIVE --- */

/* Tablet (≤768px) */
@media (max-width: 768px) {

    /* Landing */
    .landing-nav { padding: 14px 20px; }
    .landing-nav .btn-cta { padding: 8px 16px; font-size: 14px; }
    .hero { padding: 48px 20px 36px; }
    .hero p { font-size: 16px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-cta, .btn-cta-ghost { width: 100%; max-width: 320px; text-align: center; }
    .features { grid-template-columns: 1fr 1fr; padding: 40px 20px; gap: 16px; }
    .pricing { padding: 40px 20px; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }

    /* Dashboard */
    .dash-nav { padding: 12px 16px; }
    .dash-nav-user { font-size: 12px; gap: 8px; }
    .dash-content { padding: 20px 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-value { font-size: 22px; }
    .section-card { padding: 18px 16px; }

    /* Auth */
    .auth-card { padding: 32px 20px; }
    .onboarding-card { padding: 32px 20px; }

    /* Tip page */
    .tip-artist-photo { height: 320px; }
    .tip-amounts { gap: 8px; }
    .tip-btn { font-size: 18px; padding: 16px 8px; }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {

    /* Landing */
    .hero h1 { font-size: 42px; }
    .features { grid-template-columns: 1fr; }
    .landing-logo img { height: 28px !important; }

    /* Dashboard nav */
    .dash-nav { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
    .dash-nav-user { font-size: 11px; }

    /* Stats: 1 columna en pantallas muy pequeñas */
    .stats-grid { grid-template-columns: 1fr 1fr; }

    /* El grid de QR + Perfil → apilado */
    .dash-content > div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Section card */
    .section-card { padding: 16px 14px; }
    .section-card h3 { font-size: 13px; }

    /* Tip page */
    .tip-artist-photo { height: 260px; }
    .tip-artist-name { font-size: 24px; }
    .tip-amounts { max-width: 100%; }
    .btn-pay { max-width: 100%; font-size: 16px; }
    .tip-custom { max-width: 100%; }

    /* Auth */
    .auth-page { padding: 20px 14px; align-items: flex-start; padding-top: 32px; }
    .auth-card { padding: 28px 18px; }

    /* Venue dashboard artist cards */
    .artist-card { flex-wrap: wrap; gap: 10px; }
    .artist-stats { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; }
    .artist-actions { margin-left: auto; }

    /* Flyers grid */
    .formats-grid { grid-template-columns: 1fr !important; }

    /* Report table */
    .section-card div[style*="overflow-x"] { font-size: 13px; }

    /* Invite link */
    .section-card[style*="display:flex"] { flex-direction: column !important; }

    /* Onboarding */
    .onboarding { padding: 20px 14px; }
    .onboarding-card { padding: 28px 18px; }

    /* Pricing cards */
    .pricing-card { padding: 22px 18px; }
    .pricing-price { font-size: 30px; }

    /* Join page */
    .auth-page[style] { padding: 0 !important; }
}

/* Muy pequeño (≤360px) */
@media (max-width: 360px) {
    .tip-amounts { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .tip-btn { font-size: 16px; padding: 14px 4px; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 36px; }
}
