/* Giftella for Teams — shared dashboard styles */

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

:root {
    --bg:        #0e0a18;
    --bg2:       #0b0713;
    --card:      rgba(255,255,255,0.05);
    --card-hover: rgba(255,255,255,0.08);
    --card-border: rgba(255,255,255,0.08);
    --text:      #fdf8ee;
    --muted:     #9d8eb0;
    --gold:      #c8a84b;
    --gold2:     #e7ca79;
    --gold3:     #a68438;
    --plum:      #3d2370;
    --plum2:     #6138a8;
    --rose:      #db6b8c;
    --sage:      #61a68c;
    --danger:    #db6b8c;
    --success:   #61a68c;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.serif { font-family: 'DM Serif Display', Georgia, serif; }

/* Ambient glow */
.glow { position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(120px); opacity: 0.25; }
.glow--plum { width: 500px; height: 500px; top: -120px; right: -100px; background: radial-gradient(circle, var(--plum2), transparent 70%); }
.glow--gold { width: 400px; height: 400px; bottom: 20%; left: -80px; background: radial-gradient(circle, var(--gold3), transparent 70%); opacity: 0.15; }

/* App shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; position: relative; z-index: 1; }
@media (max-width: 820px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* Sidebar */
.sidebar {
    background: rgba(14,10,24,0.85);
    border-right: 1px solid var(--card-border);
    padding: 24px 16px; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 4px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 24px; text-decoration: none; color: var(--text); }
.side-brand-icon { width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--gold2); }
img.side-brand-icon { object-fit: contain; background: transparent; padding: 0; }
.side-brand-text { font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: var(--gold2); }
.side-brand-suffix { font-size: 10px; font-weight: 500; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; border-left: 1px solid rgba(255,255,255,0.12); padding-left: 8px; }
.side-section-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; margin: 20px 10px 8px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.15s; }
.side-link:hover { background: var(--card); color: var(--text); }
.side-link.active { background: rgba(200,168,75,0.10); color: var(--gold2); }
.side-link .icon { width: 18px; height: 18px; opacity: 0.75; }
.side-org { margin-top: auto; padding: 12px; background: var(--card); border-radius: 12px; border: 1px solid var(--card-border); }
.side-org-name { font-weight: 600; font-size: 13px; }
.side-org-plan { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* Overflow menu (•••) — hides power-user pages so the default view feels minimal */
.side-more {
    position: relative;
    margin-top: 4px;
}
.side-more-trigger {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 10px; color: var(--muted); cursor: pointer;
    font-size: 14px; font-weight: 500; user-select: none;
    background: transparent; border: none; width: 100%;
    text-align: left; font-family: inherit;
}
.side-more-trigger:hover { background: var(--card); color: var(--text); }
.side-more-panel {
    display: none;
    margin-top: 4px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    flex-direction: column;
    gap: 2px;
}
.side-more.open .side-more-panel { display: flex; }
.side-more-panel .side-link {
    font-size: 13px;
    padding: 8px 12px;
}

/* Main content */
.main { padding: 32px 40px; max-width: 1200px; overflow-x: hidden; }
@media (max-width: 620px) { .main { padding: 24px 20px; } }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.topbar-title h1 { font-family: 'DM Serif Display', Georgia, serif; font-size: 30px; font-weight: 400; line-height: 1.1; }
.topbar-title p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* Cards */
.card {
    background: var(--card); border: 1px solid var(--card-border);
    border-radius: 18px; padding: 24px;
}
.card h2 { font-family: 'DM Serif Display', Georgia, serif; font-size: 22px; font-weight: 400; margin-bottom: 4px; }
.card h2 + p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 100px; font-size: 14px;
    font-weight: 600; text-decoration: none; transition: all 0.2s;
    background: var(--card); border: 1px solid var(--card-border);
    color: var(--text); cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--card-hover); transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--gold2), var(--gold), var(--gold3));
    color: var(--bg); border: none;
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(200,168,75,0.30); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: rgba(219,107,140,0.25); }
.btn-danger:hover { background: rgba(219,107,140,0.10); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
    padding: 20px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--card-border);
}
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stat-value { font-family: 'DM Serif Display', Georgia, serif; font-size: 28px; color: var(--text); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Moment card */
.moment {
    display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center;
    padding: 18px 20px; border-radius: 14px; margin-bottom: 10px;
    background: var(--card); border: 1px solid var(--card-border); transition: all 0.2s;
}
.moment:hover { background: var(--card-hover); border-color: rgba(200,168,75,0.20); transform: translateY(-1px); }
.moment-date {
    background: linear-gradient(135deg, var(--plum), var(--plum2));
    border-radius: 12px; padding: 12px 8px; text-align: center;
    color: var(--gold2);
}
.moment-date .day { font-family: 'DM Serif Display', Georgia, serif; font-size: 22px; line-height: 1; }
.moment-date .month { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.moment-body .type { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold2); }
.moment-body .name { font-family: 'DM Serif Display', Georgia, serif; font-size: 19px; margin-top: 2px; line-height: 1.2; }
.moment-body .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.moment-cta { display: flex; align-items: center; gap: 8px; }

.moment-urgent { border-color: rgba(219,107,140,0.35); }
.moment-urgent .moment-date { background: linear-gradient(135deg, #8b2d4e, var(--rose)); color: #fdf8ee; }
.moment-picked .moment-date { background: linear-gradient(135deg, #2d5c4e, var(--sage)); color: #fdf8ee; }

/* Empty states */
.empty {
    text-align: center; padding: 60px 20px; color: var(--muted);
    background: var(--card); border: 1px dashed var(--card-border);
    border-radius: 16px;
}
.empty h3 { font-family: 'DM Serif Display', Georgia, serif; font-size: 22px; color: var(--text); margin-bottom: 8px; font-weight: 400; }
.empty p { max-width: 400px; margin: 0 auto; font-size: 14px; line-height: 1.7; }

/* Form inputs */
.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.5px; }
.field input, .field select, .field textarea {
    padding: 11px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text); font-size: 14px; font-family: inherit;
    transition: all 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: rgba(200,168,75,0.5);
    background: rgba(255,255,255,0.06);
}
.field textarea { min-height: 80px; resize: vertical; font-family: inherit; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--card-border); font-size: 14px; }
.table th { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* Toast/banner */
.banner { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; }
.banner-info { background: rgba(97,56,168,0.12); border: 1px solid rgba(97,56,168,0.25); color: #c0a8e0; }
.banner-success { background: rgba(97,166,140,0.12); border: 1px solid rgba(97,166,140,0.3); color: var(--sage); }
.banner-error { background: rgba(219,107,140,0.12); border: 1px solid rgba(219,107,140,0.3); color: var(--rose); }

/* Pills / tags */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }
.pill-gold { background: rgba(200,168,75,0.12); color: var(--gold2); }
.pill-sage { background: rgba(97,166,140,0.12); color: var(--sage); }
.pill-rose { background: rgba(219,107,140,0.12); color: var(--rose); }
.pill-muted { background: rgba(255,255,255,0.05); color: var(--muted); }

/* Gift suggestion grid */
.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gift {
    border-radius: 18px; overflow: hidden;
    background: var(--card); border: 1px solid var(--card-border);
    display: flex; flex-direction: column; cursor: pointer;
    transition: all 0.2s; position: relative;
}
.gift:hover { border-color: rgba(200,168,75,0.35); transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0,0,0,0.35); }
.gift.selected { border-color: var(--gold2) !important; box-shadow: 0 0 0 2px var(--gold2), 0 16px 32px rgba(200,168,75,0.30); }

/* Visual top — image with emoji fallback + price badge */
.gift-image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--plum), var(--plum2));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.gift-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gift-emoji-fallback { font-size: 72px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35)); }
.gift-price-badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(14,10,24,0.85);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: var(--gold2); font-family: 'DM Serif Display', Georgia, serif;
    padding: 6px 12px; border-radius: 100px;
    font-size: 14px; font-weight: 500;
    border: 1px solid rgba(200,168,75,0.30);
}

/* Body */
.gift-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.gift-category { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold2); font-weight: 600; }
.gift-title { font-family: 'DM Serif Display', Georgia, serif; font-size: 17px; line-height: 1.3; color: var(--text); }
.gift-desc { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }
.gift-actions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
    padding-top: 10px; border-top: 1px solid var(--card-border);
}
.gift-actions a {
    font-size: 11px; color: var(--muted); text-decoration: none;
    transition: color 0.15s;
}
.gift-actions a:hover { color: var(--gold2); }

/* Legacy pick-page price/footer — kept for any older callers */
.gift-footer { display: flex; justify-content: space-between; align-items: center; padding: 0 18px 16px; }
.gift-price { font-family: 'DM Serif Display', Georgia, serif; font-size: 18px; color: var(--gold2); }

/* Spinner */
.spinner { width: 22px; height: 22px; border: 2.5px solid rgba(200,168,75,0.15); border-top-color: var(--gold2); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 60px; flex-direction: column; gap: 12px; color: var(--muted); }
