/* Variables */
:root {
    --pink: #d6336c;
    --pink-light: #ffb3c1;
    --bg: #fff0f3;
    --card-bg: #fff5f7;
    --text: #333;
    --text-muted: #888;
    --border: #ffb3c1;
    --white: #fff;
    --danger: #e03131;
    --success: #2f9e44;
}

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

body {
    font-family: 'Georgia', serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Screens */
.screen { min-height: 100vh; }

/* Auth */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.auth-header h1 { color: var(--pink); font-size: 28px; text-align: center; }
.auth-header p { color: var(--text-muted); text-align: center; font-style: italic; }

/* Inputs */
.input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: var(--white);
}
.input:focus { border-color: var(--pink); }

/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--pink); color: white; }
.btn-secondary { background: var(--pink-light); color: var(--pink); }
.btn-danger { background: var(--danger); color: white; }
.btn-small { width: auto; padding: 8px 16px; font-size: 14px; }
.btn-outline { background: transparent; border: 2px solid var(--pink); color: var(--pink); }

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-points { font-size: 20px; font-weight: bold; color: var(--pink); }
.points-label { font-size: 12px; }
.topbar-title { font-size: 16px; font-weight: bold; color: var(--pink); }

/* Fulfillment banner */
#fulfillment-banner {
    background: linear-gradient(135deg, #ff6b9d, #ff4081);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 57px;
    z-index: 9;
    letter-spacing: 0.01em;
}
#fulfillment-banner:hover { filter: brightness(1.07); }

/* Content area */
#content-area {
    padding: 12px 12px 80px;
    max-width: 600px;
    margin: 0 auto;
}

.view { display: none; }
.view.active { display: block; }

/* Coupon cards */
.coupon-card {
    border: 2px dashed var(--pink-light);
    border-radius: 14px;
    padding: 16px;
    background: var(--card-bg);
    margin-bottom: 12px;
    position: relative;
}
.coupon-card .coupon-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--pink);
    margin-bottom: 6px;
}
.coupon-card .coupon-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
}
.coupon-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}
.coupon-cost {
    background: var(--pink);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}
.coupon-uses {
    font-style: italic;
}
.coupon-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.coupon-inactive {
    opacity: 0.5;
}
.coupon-locked {
    border-color: #bbb;
    background: #f5f5f5;
}
.coupon-locked .coupon-title {
    color: #888;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 2px solid var(--border);
    display: flex;
    z-index: 10;
}
.nav-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 4px;
    font-family: inherit;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
}
.nav-btn.active { color: var(--pink); }
.nav-icon { font-size: 22px; }

/* Badge */
.badge {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(4px);
    background: var(--pink);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FAB */
.fab {
    transition: opacity 0.2s ease;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--pink);
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(214,51,108,0.4);
    z-index: 5;
}
.fab-secondary {
    bottom: 148px;
    background: var(--white);
    color: var(--pink);
    border: 2px solid var(--pink);
    box-shadow: 0 3px 8px rgba(214,51,108,0.25);
}

/* Appreciation cards */
.appreciation-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.appreciation-card:not(.appreciation-used):hover { border-color: var(--pink); background: #fff5f8; }
.appreciation-used { opacity: 0.5; cursor: default; }
.appreciation-emoji { font-size: 28px; line-height: 1; }
.appreciation-info { flex: 1; }
.appreciation-label { font-weight: 600; font-size: 15px; }
.appreciation-rp { font-size: 12px; color: var(--pink); margin-top: 2px; }
.appreciation-sent-badge { font-size: 12px; color: #888; font-style: italic; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-end;
    z-index: 100;
}
.modal {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--pink);
    margin-bottom: 16px;
    text-align: center;
}

/* Notification items */
.notif-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}
.notif-item.unread {
    border-color: var(--pink);
    background: #fff5f7;
}
.notif-item .notif-title {
    font-weight: bold;
    color: var(--pink);
    font-size: 14px;
}
.notif-item .notif-body {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}
.notif-item .notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Redemption items */
.redemption-item {
    border: 2px solid var(--pink-light);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: var(--card-bg);
}
.redemption-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--pink);
}
.redemption-message {
    font-style: italic;
    color: #555;
    margin: 6px 0;
    font-size: 14px;
}
.redemption-from {
    font-size: 12px;
    color: var(--text-muted);
}

/* Profile */
.profile-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.profile-name {
    font-size: 22px;
    font-weight: bold;
    color: var(--pink);
    text-align: center;
    margin-bottom: 4px;
}
.profile-username {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}
.profile-points-big {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: var(--pink);
}
.profile-points-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Partner section */
.partner-section {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}
.partner-section h3 {
    color: var(--pink);
    margin-bottom: 12px;
}

/* Invite code display */
.invite-code {
    font-size: 28px;
    font-weight: bold;
    color: var(--pink);
    letter-spacing: 4px;
    text-align: center;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 10px;
    margin: 8px 0;
}

/* Error/success */
.error-msg { color: var(--danger); font-size: 14px; text-align: center; }
.success-msg { color: var(--success); font-size: 14px; text-align: center; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }

/* Textarea */
textarea.input {
    resize: vertical;
    min-height: 80px;
}

label.form-label {
    font-size: 14px;
    font-weight: bold;
    color: var(--pink);
    display: block;
    margin-bottom: 4px;
}

.form-group {
    width: 100%;
    margin-bottom: 12px;
}

/* Template import */
.template-set-btn {
    border: 2px solid var(--pink-light);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: var(--card-bg);
    margin-bottom: 10px;
}
.template-set-btn:hover, .template-set-btn.selected {
    border-color: var(--pink);
    background: #fff0f3;
}
.template-set-btn .set-name { font-size: 18px; font-weight: bold; color: var(--pink); }
.template-set-btn .set-desc { font-size: 13px; color: #555; margin-top: 4px; }

/* Auth switch link */
.auth-switch {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}
.auth-switch a {
    color: var(--pink);
    text-decoration: none;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* Inbox section header */
.inbox-section-header {
    font-size: 14px;
    font-weight: bold;
    color: var(--pink);
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

/* Profile action row */
.profile-action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

/* Danger zone */
.danger-section {
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
}
.danger-section p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
