/* ============================================================
   IDFIXERDATA — Teal & Burnt Orange theme (v5.1)
   Palette: dark teal #1d3c45 / burnt orange #d2601a / cream #fff1e1
   ============================================================ */

:root {
    --primary-color: #d2601a;
    --primary-deep: #b04e12;
    --brand-dark: #1d3c45;
    --brand-dark-rgb: 29, 60, 69;
    --accent-color: #1d3c45;
    --primary-rgb: 210, 96, 26;
    --brand-gradient: linear-gradient(135deg, #1d3c45 0%, #122831 100%);
    --cta-gradient: linear-gradient(135deg, #d2601a 0%, #b04e12 100%);
    --secondary-color: #64748b;
    --success-color: #1cc88a;
    --info-color: #2a7a8c;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #fff8ef;
    --dark-color: #1d3c45;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --card-border: #f0dfca;
    --sidebar-bg: #1d3c45;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
}

/* ---- Bootstrap re-brand: point "primary" at emerald ---- */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }
a { color: var(--primary-deep); }

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50rem;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-deep) !important;
    border-color: var(--primary-deep) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn { border-radius: 50rem; }

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.15);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
}

/* ---- Top bar: light with emerald brand ---- */
.navbar.topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 1px 3px rgba(16, 40, 32, 0.06);
}

.navbar.topbar .navbar-brand {
    color: var(--brand-dark) !important;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    background-color: rgba(var(--primary-rgb), 0.12);
    color: var(--brand-dark);
}

/* ---- Cards: flat, bordered, no lift ---- */
.card {
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    box-shadow: 0 1px 2px rgba(16, 40, 32, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--card-bg);
    margin-bottom: 1.5rem;
}

.card:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 4px 14px rgba(16, 40, 32, 0.08);
}

.card-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    font-weight: 700;
    color: var(--brand-dark);
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ---- Sidebar: dark charcoal, emerald active pill ---- */
.sidebar {
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: white;
}

/* Offcanvas variant: force the dark panel + readable items so the menu is
   never light-on-white, and keep it stacked above the fixed bottom nav. */
.offcanvas.sidebar {
    background-color: var(--sidebar-bg) !important;
    color: #fff !important;
    z-index: 1050;
    /* Override the static sidebar's min-height:100vh — on mobile that is taller
       than the visible viewport and pushes the lower items off-screen. Pin the
       panel to the real viewport height so the body scrolls instead. */
    min-height: 0 !important;
    height: 100dvh;
    max-width: 85vw;
}

.offcanvas.sidebar .offcanvas-header,
.offcanvas.sidebar .offcanvas-body {
    background-color: var(--sidebar-bg);
}

/* Let the menu scroll, with momentum on iOS, and keep the last item clear of
   the bottom edge / home indicator. */
.offcanvas.sidebar .offcanvas-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.8rem 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    margin-bottom: 2px;
}

.sidebar .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.07);
}

.sidebar .nav-link.active {
    color: #fff !important;
    background-color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* ---- Auth screens ---- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

/* ---- Wallet / balance card ---- */
.balance-card {
    background: var(--brand-gradient);
    color: white;
}

.balance-card .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ---- Loader ---- */
.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    margin-bottom: 10px;
}

.modern-spinner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

.modern-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid transparent;
    border-left-color: var(--primary-color);
    border-bottom-color: var(--accent-color);
    opacity: 0.5;
    filter: blur(8px);
    animation: spin 1s linear infinite;
}

.loader-logo-inner {
    display: block;
    width: 50px;
    height: auto;
    object-fit: contain;
    animation: pulse 1.5s infinite ease-in-out;
    z-index: 2;
}

.loader p {
    display: block !important;
    margin: 0 !important;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* ---- Selects ---- */
select.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 2px solid #f0dfca;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

select.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    outline: none;
}

select.form-select option {
    padding: 10px;
    font-weight: normal;
}

#plan-select {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    font-size: 1.05rem;
}

#plan-select:hover {
    background-color: #fff;
    border-color: var(--primary-color);
}

.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }

/* ---- Network cards ---- */
.network-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f5e6d3;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.network-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.network-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.network-card:hover::after {
    transform: scaleX(1);
}

.network-card img {
    max-height: 55px;
    width: auto;
    transition: all 0.5s ease;
}

.network-card:hover img {
    transform: scale(1.1) rotate(3deg);
}

/* ---- Bottom navigation (mobile) ---- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.bottom-nav-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    list-style: none;
    margin: 0;
}

.bottom-nav-item {
    text-align: center;
    flex: 1;
}

.bottom-nav-link {
    color: #8a7f75;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.bottom-nav-link i {
    font-size: 1.25rem;
    margin-bottom: 3px;
    transition: transform 0.2s;
}

.bottom-nav-link.active, .bottom-nav-link:hover {
    color: var(--primary-color);
    font-weight: 600;
}

.bottom-nav-link.active i {
    transform: translateY(-2px);
}

/* Center action button: squircle, emerald */
.bottom-nav-item.fab-container {
    position: relative;
    top: -25px;
}

.fab-main {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: var(--cta-gradient);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.4);
    text-decoration: none;
}

.fab-main:hover, .fab-main:focus { color: #fff; }

.bottom-nav-item.fab-container .bottom-nav-link {
    background: var(--cta-gradient);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.4);
    border: 4px solid #fff;
}

.bottom-nav-item.fab-container .bottom-nav-link i {
    font-size: 1.5rem;
    margin: 0;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 80px;
    }

    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }

    .card {
        border-radius: 16px;
        margin-bottom: 1rem;
    }

    .quick-action-item:active {
        transform: scale(0.96);
        background-color: var(--light-color);
    }

    .balance-card {
        margin-top: 5px;
        margin-bottom: 20px;
        padding: 10px;
    }

    .balance-card .card-body {
        padding: 1.5rem;
    }

    .col-6 {
        padding: 8px !important;
    }
}

/* ---- Quick actions ---- */
.quick-action-item {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    border: 1px solid #f5e6d3;
    transition: transform 0.1s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quick-action-item .small {
    font-size: 0.9rem;
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 10px;
}

/* ---- Icon tint utilities (primary tint follows brand) ---- */
.bg-blue-light { background-color: rgba(var(--primary-rgb), 0.12); }
.bg-green-light { background-color: rgba(28, 200, 138, 0.1); }
.bg-yellow-light { background-color: rgba(246, 194, 62, 0.1); }
.bg-cyan-light { background-color: rgba(var(--brand-dark-rgb), 0.1); }
.bg-purple-light { background-color: rgba(111, 66, 193, 0.1); }

/* ---- Services bottom sheet ---- */
.action-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.action-icon-circle:active {
    transform: scale(0.9);
}

.text-purple { color: #6f42c1; }

@media (max-width: 576px) {
    .bottom-sheet-modal .modal-dialog {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        max-width: 100%;
        transform: translate(0, 100%);
        transition: transform 0.3s ease-out;
    }

    .bottom-sheet-modal.show .modal-dialog {
        transform: translate(0, 0);
    }

    .bottom-sheet-modal .modal-content {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        border: none;
        padding-bottom: 20px;
    }
}

/* ---- Misc utilities ---- */
.letter-spacing-1 {
    letter-spacing: 1px;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.balance-card {
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(var(--brand-dark-rgb), 0.3) !important;
}
