/* ROTA MONEY — member web app
   Palette and type match the mobile app exactly:
   mobile/rota_money_app/lib/core/constants/app_colors.dart */

@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

:root {
    /* ROTA brand palette (Nov 2025 Style Guide) — 1:1 with app_colors.dart */
    --rota-navy: #201C4F;
    --rota-navy-light: #3B3470;
    --rota-navy-dark: #14113A;
    --rota-gold: #E7BB68;
    --rota-gold-light: #F0CF8E;
    --rota-gold-dark: #C4994B;

    --primary: #D3A246;
    --primary-light: var(--rota-gold-light);
    --primary-dark: var(--rota-gold-dark);

    --secondary: var(--rota-navy);
    --scaffold-bg: #211A50;

    --success: #4CAF50;
    --error: #E53935;
    --warning: #FF9800;
    --info: #2196F3;

    --grey-100: #F5F5F5;
    --grey-300: #E0E0E0;
    --grey-500: #9E9E9E;
    --grey-700: #616161;

    --text-primary: #212121;
    --text-secondary: #757575;
    --border: #E0E0E0;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 4px 20px rgba(32, 28, 79, 0.08);
    --bottom-nav-height: 64px;
    --top-nav-height: 60px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F7F6FB;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--bottom-nav-height) + 12px);
    /* Larger base type across the whole site (mirrors the mobile app's
       app_theme.dart TextTheme bump). */
    font-size: 1.0625rem;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--rota-navy); }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.15rem; }
.small, small { font-size: 0.875rem; }

a { color: var(--rota-navy); }

/* ---- Top navbar (brand bar — always visible) ---- */
.rota-topbar {
    background: var(--scaffold-bg);
    color: #fff;
    height: var(--top-nav-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.rota-topbar .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.rota-topbar .brand img { height: 36px; width: auto; }
.rota-topbar .brand span { font-size: 1.4rem; letter-spacing: 0.06em; }

.rota-topbar .top-actions { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

.rota-topbar .icon-btn {
    color: #fff;
    background: none;
    border: none;
    position: relative;
    font-size: 1.25rem;
    padding: 0.25rem;
    text-decoration: none;
}

/* Desktop nav: Notifications link badge + Logout form-button styled as a link */
.rota-desktop-nav .notif-link { position: relative; }
.rota-desktop-nav .nav-link-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0.4rem 0;
    cursor: pointer;
}
.rota-desktop-nav .nav-link-btn:hover { color: #fff; }

.notif-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--error);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ---- Desktop side/top nav links (hidden on mobile — bottom nav takes over) ---- */
.rota-desktop-nav { display: none; }

/* ---- Bottom nav (mobile — mirrors main_shell_screen.dart's 4 tabs) ---- */
.rota-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 1030;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.rota-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--grey-500);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 0;
}

.rota-bottom-nav .nav-item i { font-size: 1.35rem; }

.rota-bottom-nav .nav-item.active { color: var(--rota-navy); }
.rota-bottom-nav .nav-item.active i { color: var(--primary); }

/* Logout is a POST form; make its button look identical to the anchor items */
.rota-bottom-nav .nav-item-form { padding: 0; }
.rota-bottom-nav .nav-item-btn {
    background: none;
    border: none;
    color: var(--grey-500);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.rota-bottom-nav .nav-item-btn i { font-size: 1.35rem; }

.nav-item-badge-wrap { position: relative; display: inline-flex; }
.rota-bottom-nav .nav-item-badge-wrap .notif-badge { top: -6px; right: -10px; }

/* ---- Desktop: >= 992px — top nav takes over, bottom nav hides ---- */
@media (min-width: 992px) {
    body { padding-bottom: 0; }
    .rota-bottom-nav { display: none; }
    .rota-desktop-nav { display: flex; align-items: center; gap: 1.5rem; margin-left: 2rem; }
    .rota-desktop-nav a {
        color: rgba(255,255,255,0.75);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.95rem;
        padding: 0.4rem 0;
        border-bottom: 2px solid transparent;
    }
    .rota-desktop-nav a.active { color: #fff; border-bottom-color: var(--primary); }
}

.page-content { padding: 1.25rem 1rem 1.5rem; max-width: 720px; margin: 0 auto; }

@media (min-width: 992px) {
    .page-content { max-width: 960px; padding: 2rem 1.5rem; }
}

/* ---- Cards ---- */
.rota-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(32,28,79,0.05);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.rota-card-navy {
    background: linear-gradient(135deg, var(--rota-navy) 0%, var(--rota-navy-light) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.rota-card-navy .label { color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.rota-card-navy .value { font-size: 1.75rem; font-weight: 700; }

/* ---- Buttons ---- */
.btn-rota-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #1A1A1A;
    font-weight: 600;
}
.btn-rota-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #1A1A1A; }

.btn-rota-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--rota-navy);
    font-weight: 600;
}
.btn-rota-outline:hover { background: var(--primary-light); }

/* ---- Badges (status pills) ---- */
.badge-rota { border-radius: 999px; font-weight: 600; font-size: 0.75rem; padding: 0.35em 0.75em; }
.badge-forming { background: #6e84a3; color: #fff; }
.badge-active { background: var(--success); color: #fff; }
.badge-completed { background: var(--primary); color: #1A1A1A; }
.badge-suspended { background: var(--error); color: #fff; }
.badge-pending { background: var(--warning); color: #1A1A1A; }
.badge-verified { background: var(--success); color: #fff; }
.badge-rejected { background: var(--error); color: #fff; }
.badge-processing { background: var(--info); color: #fff; }
.badge-partiallypaid { background: var(--warning); color: #1A1A1A; }
.badge-failed { background: var(--error); color: #fff; }
.badge-missed { background: var(--error); color: #fff; }
.badge-invited { background: var(--grey-500); color: #fff; }
.badge-accepted { background: var(--info); color: #fff; }
.badge-removed { background: var(--grey-500); color: #fff; }

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(211, 162, 70, 0.25);
}

.pin-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ---- Auth pages (centered card on navy background) ---- */
.auth-page {
    min-height: 100vh;
    background: var(--scaffold-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}

.auth-card .logo-wrap { text-align: center; margin-bottom: 1.5rem; }
.auth-card .logo-wrap img { height: 64px; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.empty-state i { font-size: 2.5rem; color: var(--grey-300); margin-bottom: 0.75rem; display: block; }

/* ---- Profile: gold header card (stays gold regardless of wallpaper) ---- */
.rota-card-gold {
    background: linear-gradient(135deg, var(--rota-gold-light) 0%, var(--primary) 55%, var(--rota-gold-dark) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(211, 162, 70, 0.3);
}
.rota-card-gold .avatar {
    width: 92px; height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.15);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: #fff;
}
.rota-card-gold .name { font-size: 1.35rem; font-weight: 700; margin-top: 0.5rem; }
.rota-card-gold .phone { color: rgba(255,255,255,0.85); font-size: 0.95rem; }

/* ---- Profile wallpaper presets ---- */
.wallpaper-blue     { background: linear-gradient(135deg, #1B4F9C, #4E9FE0); }
.wallpaper-pink     { background: linear-gradient(135deg, #D8447F, #FFA6C6); }
.wallpaper-original { background: linear-gradient(135deg, #1B2A5E, #0F1A3D); }
.profile-wallpaper {
    border-radius: var(--radius);
    padding: 0.75rem;
    margin: -0.75rem -0.75rem 1rem;
}
.wallpaper-picker { padding: 0 0.25rem 0.25rem; }
.wallpaper-picker-label {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.wallpaper-swatches { display: flex; gap: 0.5rem; }
.wallpaper-swatch {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.wallpaper-swatch .chip {
    display: block;
    width: 100%;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,0.35);
}
.wallpaper-swatch .lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.wallpaper-swatch.selected .chip { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }
.wallpaper-swatch.selected .lbl { text-decoration: underline; }

/* ---- Notification cards: delete affordance + logo ---- */
.notif-header-logo { height: 34px; width: auto; }
.notif-card-actions { display: flex; gap: 0.25rem; align-items: flex-start; }
.btn-icon-danger {
    background: none; border: none; color: var(--grey-500);
    font-size: 1.05rem; padding: 0.15rem 0.35rem; cursor: pointer; line-height: 1;
}
.btn-icon-danger:hover { color: var(--error); }
