/* =============================================================================
   Auth-page styles (login / signup / dashboard / privacy / terms).
   Layered on top of style.css — only adds new classes, never overrides.
   ============================================================================= */

.auth-shell {
    min-height: 100vh;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 120px 24px 60px;
    background: linear-gradient(180deg, #f5f0eb 0%, var(--bg) 100%);
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 36px;
}
.auth-card h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-align: center;
}
.auth-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label {
    display: block;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197,168,128,0.18);
}

.auth-form .checkbox-row {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.85rem; color: var(--text-light);
    line-height: 1.4;
}
.auth-form .checkbox-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--accent);
}
.auth-form .checkbox-row a {
    color: var(--accent-dark);
    text-decoration: underline;
}

.auth-form button[type="submit"] {
    width: 100%;
    margin-top: 4px;
}

.auth-error {
    display: none;
    background: #fde9e9;
    border: 1px solid #f5c2c2;
    color: #8a1f1f;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
}
.auth-error.visible { display: block; }

.auth-info {
    display: none;
    background: #e9f5ee;
    border: 1px solid #b9dec6;
    color: #1f5c34;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
}
.auth-info.visible { display: block; }

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}
.auth-footer a {
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

/* DASHBOARD */
.dashboard-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 24px 60px;
}
.dashboard-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    margin-bottom: 32px;
}
.dashboard-header h1 {
    font-size: 1.8rem;
    margin: 0;
}
.dashboard-header .user-meta {
    color: var(--text-light); font-size: 0.9rem;
}

/* Greeting strip — avatar + name + new-tryon CTA */
.dashboard-hero {
    display: flex; align-items: center; gap: 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 24px;
}
.dashboard-hero-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 1.4rem;
    text-transform: uppercase;
    flex-shrink: 0;
}
.dashboard-hero-text { flex: 1; min-width: 0; }
.dashboard-hero-text h1 {
    font-size: 1.7rem;
    margin: 0 0 2px;
    line-height: 1.1;
}
.dashboard-hero-text .user-meta {
    color: var(--text-light); font-size: 0.9rem;
    word-break: break-word;
}
.dashboard-hero-cta { flex-shrink: 0; }
@media (max-width: 600px) {
    .dashboard-hero { flex-wrap: wrap; padding: 18px; gap: 14px; }
    .dashboard-hero-cta { width: 100%; text-align: center; }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}
.dashboard-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.dashboard-card-accent {
    background: linear-gradient(180deg, #fdf8f1 0%, #fff 70%);
    border-color: rgba(197, 168, 128, 0.45);
}
.dashboard-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}
.dashboard-card .big-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    color: var(--text);
    line-height: 1;
}
.dashboard-card .card-sub {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.dashboard-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}
.dashboard-section h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.dashboard-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin: 0 0 14px;
    color: var(--text);
}

/* Action tiles — Help / Support / Terms / Logout shortcuts in trymydress
   profile style. Each is a card with an icon, name and short subtitle. */
.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.dashboard-tile {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 20px 20px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    font-family: 'Inter', sans-serif;
}
.dashboard-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(40, 30, 20, 0.07);
    border-color: rgba(197, 168, 128, 0.55);
    color: var(--text);
}
.dashboard-tile-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(197, 168, 128, 0.12);
    color: var(--accent-dark);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.dashboard-tile-icon svg {
    width: 20px; height: 20px;
}
.dashboard-tile-name {
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 2px;
}
.dashboard-tile-sub {
    font-size: 0.82rem;
    color: var(--text-light);
}
.dashboard-tile-danger:hover {
    border-color: #d99a9a;
    color: var(--text);
}
.dashboard-tile-danger .dashboard-tile-icon {
    background: rgba(217, 154, 154, 0.14);
    color: #b65a5a;
}

.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.history-item img {
    width: 64px; height: 64px; object-fit: cover;
    border-radius: 8px;
    background: #f4f1ec;
}
.history-item .meta {
    font-size: 0.9rem;
    color: var(--text);
}
.history-item .meta .when {
    display: block;
    color: var(--text-light); font-size: 0.78rem;
    margin-top: 2px;
}
.history-item .status {
    font-size: 0.78rem; font-weight: 600;
    padding: 4px 10px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.history-item .status.completed { background: #e9f5ee; color: #1f5c34; }
.history-item .status.pending,
.history-item .status.running    { background: #fff4e0; color: #8a5a1f; }
.history-item .status.failed,
.history-item .status.canceled   { background: #fde9e9; color: #8a1f1f; }
/* ==========================================================================
   Gallery — masonry-ish grid of past tryons with hover overlay + lightbox.
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #f4f1ec;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: transform 0.18s, box-shadow 0.18s;
}
.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(40, 30, 20, 0.10);
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-item-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 14px 12px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
    color: #fff;
    text-align: left;
    font-family: 'Inter', sans-serif;
}
.gallery-item-name {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-item-when {
    font-size: 0.75rem;
    opacity: 0.82;
    margin-bottom: 6px;
}
.gallery-item .status {
    display: inline-block;
    font-size: 0.7rem; font-weight: 600;
    padding: 3px 8px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: rgba(255,255,255,0.85); color: var(--text);
}
.gallery-item .status.completed { background: #e9f5ee; color: #1f5c34; }
.gallery-item .status.pending,
.gallery-item .status.running   { background: #fff4e0; color: #8a5a1f; }
.gallery-item .status.failed,
.gallery-item .status.canceled  { background: #fde9e9; color: #8a1f1f; }

.gallery-lightbox-content {
    max-width: 720px;
    padding: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}
.gallery-lightbox-content img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #f4f1ec;
    display: block;
}
.gallery-lightbox-meta {
    padding: 14px 20px 18px;
    font-family: 'Inter', sans-serif;
}
.gallery-lightbox-meta div:first-child {
    font-weight: 600;
    color: var(--text);
}
.gallery-lightbox-meta .when {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

.history-empty {
    text-align: center;
    color: var(--text-light);
    padding: 24px 0;
    font-size: 0.9rem;
}

/* Nav auth pills */
.nav-links .nav-cta {
    background: var(--accent);
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: #fff !important; }
.nav-links .nav-ghost {
    color: var(--text) !important;
    font-weight: 500;
}

/* Long-form policy pages */
.policy-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}
/* Wider variant for content where 760px feels cramped (pricing grid). */
.policy-shell.policy-shell-wide {
    max-width: 1080px;
}
.policy-shell h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
}
.policy-shell .policy-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 32px;
}
.policy-shell h2 {
    font-size: 1.4rem;
    margin: 32px 0 12px;
}
.policy-shell h3 {
    font-size: 1.1rem;
    margin: 24px 0 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.policy-shell p,
.policy-shell li {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.7;
}
.policy-shell ul,
.policy-shell ol {
    margin: 12px 0 12px 24px;
}
.policy-shell li { margin-bottom: 6px; }
.policy-shell a {
    color: var(--accent-dark);
}

/* ==========================================================================
   Pricing cards — larger, breathable, trymydress-inspired feel.
   Used both on /pricing.html and inside the buy-credits modal.
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 12px;
}
@media (max-width: 820px) {
    .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
}
.pricing-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px 28px 28px;
    text-align: center;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(40, 30, 20, 0.07);
    border-color: rgba(197, 168, 128, 0.55);
}
.pricing-card.pricing-featured {
    border-color: var(--accent);
    box-shadow: 0 18px 44px rgba(197, 168, 128, 0.22);
    transform: translateY(-6px) scale(1.02);
    background: linear-gradient(180deg, #fdf8f1 0%, #fff 60%);
}
.pricing-card.pricing-featured:hover {
    transform: translateY(-9px) scale(1.02);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.pricing-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-dark);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.pricing-tries {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text);
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 22px;
    line-height: 1.1;
}
.pricing-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}
.pricing-per {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 22px;
}
.pricing-includes {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.5;
}
.pricing-includes li {
    position: relative;
    padding: 6px 0 6px 26px;
    border-bottom: 1px dashed rgba(197, 168, 128, 0.25);
}
.pricing-includes li:last-child { border-bottom: none; }
.pricing-includes li::before {
    content: "";
    position: absolute;
    left: 4px; top: 12px;
    width: 12px; height: 6px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}
.pricing-buy {
    width: 100%;
    margin-top: auto;
    padding-top: 14px;
    padding-bottom: 14px;
}
.pricing-buy[disabled] {
    opacity: 0.6;
    cursor: progress;
}

/* Checkout result pages */
.checkout-shell {
    max-width: 520px;
    margin: 0 auto;
    padding: 140px 24px 60px;
    text-align: center;
}
.checkout-shell h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}
.checkout-shell p {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 16px;
}
.checkout-shell .checkout-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}
.checkout-icon {
    font-size: 64px;
    margin-bottom: 16px;
    line-height: 1;
}
