* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: #f5f6f8;
    color: #1c1f24;
    line-height: 1.5;
}

main.container {
    padding-bottom: 90px; /* espace pour la bottom-nav fixe */
}

.auth-view main.container,
.public-view main.container {
    padding-bottom: 2rem;
}

.app-layout {
    display: block;
}

.main-content {
    flex: 1;
}

.sidebar {
    display: none;
}

main.container > section {
    margin-bottom: 1.8rem;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.public-view .container {
    width: min(1280px, 92%);
}

.public-view .app-layout {
    display: block;
    width: 100%;
    margin: 0;
    padding-top: 0;
}

.public-view main.container > section {
    margin-bottom: 3rem;
}

.public-view .hero,
.public-view .feature-grid,
.public-view .steps,
.public-view .cta {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e8ec;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-view .site-header {
    display: none;
}

.app-view main.container {
    width: min(520px, 94%);
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.tagline {
    color: #626a73;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: nowrap;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f2f4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1c1f24;
    text-decoration: none;
}

.icon-btn i {
    font-size: 1.3rem;
}

.btn {
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: opacity 0.15s, background 0.15s;
    text-align: center;
}

.btn:hover {
    opacity: 0.87;
}

.btn-primary:hover {
    background: #aa0000;
}

.btn-primary {
    background: #cc0000;
    color: #ffffff;
}

.btn-outline {
    border-color: #cc0000;
    color: #cc0000;
    background: #fff;
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    border: none;
}

.btn-whatsapp:hover {
    background: #1fb85b;
}

.hero {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.hero {
    align-items: stretch;
}

.hero-content,
.hero-card {
    min-width: 0;
}

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }

    .hero-content p {
        font-size: 1.05rem;
        max-width: 560px;
    }

    .hero-card {
        max-width: 520px;
        margin-left: auto;
    }
}

.hero-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.hero-visual {
    padding: 0;
    overflow: hidden;
}

.hero-visual img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

@media (min-width: 1024px) {
    .hero-visual img {
        height: 260px;
    }
}

.hero-card-content {
    padding: 1.5rem;
}

.landing-hero {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.landing-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: #cc0000;
    font-weight: 700;
}

.landing-hero__content h1 {
    margin: 0.6rem 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.landing-hero__content p {
    max-width: 560px;
    color: #5c5f66;
}

.landing-hero__actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-hero__badges {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: #6c737f;
    font-size: 0.95rem;
}

.landing-hero__badges i {
    color: #cc0000;
    margin-right: 0.3rem;
}

.landing-hero__visual img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.landing-panels {
    margin-top: 2.5rem;
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.landing-panel {
    background: #fff;
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid #e6e8ec;
}

.landing-panel i {
    font-size: 1.6rem;
    color: #cc0000;
}

.landing-steps {
    margin-top: 3rem;
}

.landing-steps__grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.landing-steps__grid span {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: #cc0000;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.landing-cta {
    margin-top: 3rem;
    background: #cc0000;
    color: #fff;
    padding: 2rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.landing-cta .btn {
    background: #fff;
    color: #cc0000;
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-badges {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: #6c737f;
    font-size: 0.95rem;
}

.hero-badges i {
    color: #cc0000;
    margin-right: 0.3rem;
}

.hero-card-actions {
    margin-top: 1rem;
}

.feature-grid {
    margin: 2rem 0 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(3, minmax(240px, 1fr));
    }
}

.feature {
    background: #fff;
    padding: 1.4rem;
    border-radius: 12px;
    border: 1px solid #e6e8ec;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-image {
    display: none;
}

.steps {
    margin: 3rem 0;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.step-number {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: #cc0000;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta {
    background: #cc0000;
    color: #fff;
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.cta .btn {
    background: #fff;
    color: #cc0000;
}

.card {
    background: #fff;
    padding: 1.8rem;
    border-radius: 14px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f2;
}

@media (max-width: 480px) {
    .card {
        padding: 1.2rem;
        margin: 1rem 0;
        border-radius: 10px;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-grid p {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.8rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #d7dbe0;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1c1f24;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    border-color: #cc0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

@media (max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

.form-grid button.btn {
    width: 100%;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    width: 100%;
}

.form-field label,
.form-grid label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    display: block;
    margin-bottom: 0.25rem;
}

.form-grid button.btn[type="submit"],
.form-grid > button.btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.4rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    padding-right: 2.6rem;
}

.toggle-password {
    position: absolute;
    right: 0.4rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    color: #5b6570;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.toggle-password .icon-hide {
    display: none;
}

.toggle-password.is-visible .icon-show {
    display: none;
}

.toggle-password.is-visible .icon-hide {
    display: inline-block;
}

.error {
    color: #b42318;
    font-size: 0.9rem;
}

.summary-grid,
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.balance {
    font-size: 1.6rem;
    font-weight: 700;
    color: #cc0000;
}

.actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    display: block;
    overflow-x: auto;
}

.table th,
.table td {
    border-bottom: 1px solid #e6e8ec;
    padding: 0.7rem;
    text-align: left;
}

.list {
    list-style: none;
    padding: 0;
}

.list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e6e8ec;
}

.messages {
    margin-top: 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.6rem;
}

.message.success {
    background: #e7f8ef;
    color: #1b7f44;
}

.message.error {
    background: #fde8e8;
    color: #b42318;
}

.message.warning {
    background: #fff4cc;
    color: #8a5b00;
}

.muted {
    color: #6c737f;
}

.wallet {
    background: #fff;
    border-radius: 24px;
    padding: 1.8rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-width: 680px;
    margin: 0 auto;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f2f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #2b2f36;
}

.wallet-balance {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    margin: 0.4rem 0;
    flex-wrap: wrap;
}

.wallet-growth {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    color: #1b7f44;
    font-weight: 600;
    margin-bottom: 1.4rem;
}

.wallet-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.pill {
    background: #f5f6f8;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: #1c1f24;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pill.icon-only {
    width: 42px;
    justify-content: center;
}

.activity {
    margin-top: 2rem;
}

.activity,
.wallet,
.steps,
.feature-grid,
.brand-strip,
.cta {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {
    background: #fff;
    border-radius: 16px;
    padding: 0.9rem 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.activity-item p,
.activity-item span {
    margin: 0;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1f2f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc0000;
}

.activity-title {
    margin: 0;
    font-weight: 600;
}

.activity-amount {
    font-weight: 700;
    color: #1b7f44;
}

.app-shell {
    background: linear-gradient(180deg, #f9f9fb 0%, #f5f6f8 100%);
    padding: 1.4rem 0 2rem;
    border-radius: 24px;
}

.app-topbar {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.app-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e9e6ff;
    color: #5b4db7;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-title {
    text-align: center;
    font-weight: 600;
}

.app-bell {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1f24;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.card-balance {
    background: #fff;
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.08);
}

.card-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.card-number {
    display: block;
    font-size: 0.85rem;
    color: #6c737f;
    margin-top: 0.2rem;
}

.card-balance h2 {
    margin: 0.3rem 0 0;
    font-size: 2rem;
}

.card-mini {
    width: 90px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(145deg, #111, #3b3b3b);
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.card-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.8rem;
    text-align: center;
    font-size: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.card-actions a {
    text-decoration: none;
    color: #1c1f24;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.action-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #cc0000;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.4rem;
    font-size: 1.4rem;
}

.card-promo {
    background: #ffecec;
    border-radius: 18px;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.promo-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc0000;
    font-size: 1.4rem;
}

.card-list {
    background: #fff;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.card-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.tx-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eef0f2;
}

.tx-row:last-child {
    border-bottom: none;
}

.tx-row-link {
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    border-radius: 12px;
    padding: 0.6rem 0.4rem;
}

.tx-row-link:hover {
    background: #f7f7f8;
}

.tx-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1f2f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc0000;
}

.tx-body p {
    margin: 0;
    font-weight: 600;
}

.tx-amount {
    font-weight: 700;
    color: #b42318;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.page-header h2 {
    margin: 0;
}

.card-mobile {
    background: #fff;
    border-radius: 18px;
    padding: 1.2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.list-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 0.8rem 0.9rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.list-link {
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.list-link:hover {
    background: #f7f7f8;
}

.list-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1f2f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc0000;
    font-size: 1.2rem;
}

.list-title {
    margin: 0;
    font-weight: 600;
}

.list-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.beneficiary-item {
    grid-template-columns: auto 1fr;
}

.beneficiary-item .list-body {
    min-width: 0;
}

.list-sub {
    margin-top: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.78rem;
    color: #6c737f;
    word-break: break-word;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.list-actions {
    display: flex;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.list-actions a {
    color: #6c737f;
    text-decoration: none;
}

.amount-negative {
    color: #b42318;
    font-weight: 700;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #eef0f2;
}

.contact-actions {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.profile-row:last-child {
    border-bottom: none;
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.chat-bubble {
    background: #f5f6f8;
    border-radius: 14px;
    padding: 0.6rem 0.8rem;
    max-width: 85%;
}

.chat-bubble p {
    margin: 0 0 0.3rem;
}

.chat-bubble.from-user {
    align-self: flex-end;
    background: #ffecec;
}

.chat-bubble.from-admin {
    align-self: flex-start;
    background: #f1f2f4;
}

.mobile-screen {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.dashboard-screen {
    padding-top: 1rem;
}

.mobile-topbar {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 0.8rem;
}

.topbar-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.mobile-topbar h3 {
    text-align: center;
    margin: 0;
}

.balance-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.4rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.balance-header h2 {
    margin: 0.2rem 0 0;
    font-size: 2rem;
}

.mini-card {
    width: 88px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(145deg, #1c1f24, #3b3f45);
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.balance-actions {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    text-align: center;
    font-size: 0.75rem;
}

.balance-actions a {
    text-decoration: none;
    color: #1c1f24;
}

.action-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #6f58c9;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.4rem;
    font-size: 1.3rem;
}

.promo-card {
    background: #f0e9ff;
    border-radius: 18px;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.promo-card h4 {
    margin: 0 0 0.2rem;
}

.promo-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #5c5f66;
}

.promo-card .gift {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6f58c9;
    font-size: 1.4rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e6e8ec;
    padding: 0.7rem 0.4rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.06);
    z-index: 20;
}

.bottom-nav a {
    text-decoration: none;
    color: #6c737f;
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 600;
}

.bottom-nav a.active {
    color: #cc0000;
    font-weight: 600;
}

.bottom-nav i {
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 700;
}

.site-footer {
    padding: 2rem 0;
    text-align: center;
    color: #6c737f;
}

.brand-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin: 2.5rem auto;
}

.brand-item {
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.brand-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 720px) {
    .bottom-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .bottom-nav a {
        font-size: 0.7rem;
    }
    .bottom-nav i {
        font-size: 1.4rem;
    }
    .logo-img {
        height: 30px;
    }
}

@media (min-width: 1024px) {
    .app-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 2.4rem;
        width: min(1600px, 96%);
        margin: 0 auto;
        padding-top: 1rem;
    }

    .public-view .app-layout {
        grid-template-columns: 1fr;
        width: min(1280px, 96%);
        padding-top: 0;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        background: #fff;
        border-radius: 18px;
        padding: 1.2rem;
        border: 1px solid #e6e8ec;
        height: calc(100vh - 120px);
        position: sticky;
        top: 80px;
    }

    .card-balance,
    .card-promo,
    .card-list,
    .card-mobile {
        width: 100%;
        max-width: 100%;
    }

    .sidebar-header {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        align-items: flex-start;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }

    .sidebar-nav a {
        text-decoration: none;
        color: #1c1f24;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.6rem 0.8rem;
        border-radius: 10px;
        background: #f7f7f8;
        font-weight: 600;
    }

    .sidebar-nav a i {
        color: #cc0000;
        font-size: 1.2rem;
    }

    .bottom-nav {
        display: grid;
        width: min(900px, 94%);
        margin: 0 auto;
        border-radius: 18px;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 768px) {
    .header-content {
        flex-wrap: nowrap;
    }
}

/* ── Sidebar active link ── */
.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: #fff0f0;
    color: #cc0000;
}

.sidebar-nav a.active i,
.sidebar-nav a:hover i {
    color: #cc0000;
}

/* ── Mobile screen wider on desktop ── */
@media (min-width: 1024px) {
    .mobile-screen {
        max-width: 680px;
    }
}

/* ── Global select arrow fix ── */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c737f' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.2rem;
}

/* ── File input ── */
input[type="file"] {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #6c737f;
}

/* ── Table responsive ── */
@media (max-width: 640px) {
    .table thead {
        display: none;
    }
    .table tr {
        display: block;
        margin-bottom: 1rem;
        background: #fff;
        border-radius: 10px;
        padding: 0.8rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .table td {
        display: flex;
        justify-content: space-between;
        border: none;
        padding: 0.3rem 0;
        font-size: 0.9rem;
    }
    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c737f;
        flex-shrink: 0;
        margin-right: 0.5rem;
    }
}

/* ── Profile row wrap on small screens ── */
@media (max-width: 480px) {
    .profile-row {
        flex-direction: column;
        gap: 0.2rem;
    }
    .balance {
        font-size: 1.3rem;
    }
    .card-balance h2 {
        font-size: 1.6rem;
    }
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .summary-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}

/* ── Notification items ── */
.notification-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.9rem 0;
    border-bottom: 1px solid #eef0f2;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc0000;
    flex-shrink: 0;
}

/* ── Chat improvements ── */
@media (max-width: 480px) {
    .chat-bubble {
        max-width: 92%;
        font-size: 0.92rem;
    }
}

/* ── Auth pages (login, register, OTP) ── */
.auth-view main.container {
    width: min(540px, 94%);
    margin: 0 auto;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

@media (min-width: 1024px) {
    .auth-view .app-layout {
        display: block;
        width: 100%;
        padding-top: 0;
        margin: 0;
    }
}

/* ── Django errorlist (non_field_errors) ── */
.errorlist {
    list-style: none;
    padding: 0;
    margin: 0 0 0.8rem;
}

.errorlist li {
    background: #fde8e8;
    color: #b42318;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

/* ── Register 2-col grid on desktop ── */
@media (min-width: 500px) {
    .register-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 1rem;
    }

    .register-grid .form-field.full-width {
        grid-column: 1 / -1;
    }
}

/* ── Form card max-width for auth pages ── */
.card h2 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    font-size: 1.4rem;
}

.card > .form-grid {
    margin-top: 1.2rem;
}

/* ── Header responsive ── */
@media (max-width: 400px) {
    .header-actions .btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }
    .tagline {
        display: none;
    }
}

