/* Townway Customer UI Pack 2 — Account & Profile */
:root {
    --tw-account-blue: #0007a3;
    --tw-account-navy: #07143a;
    --tw-account-ink: #172033;
    --tw-account-muted: #6d7890;
    --tw-account-line: #e8edf5;
    --tw-account-soft: #f5f7fb;
    --tw-account-white: #ffffff;
    --tw-account-success: #11855b;
    --tw-account-danger: #d63a4a;
    --tw-account-radius: 18px;
    --tw-account-shadow: 0 14px 40px rgba(19, 33, 68, .08);
}

.tw-account-modern {
    background: linear-gradient(180deg, #f7f9fd 0, #fff 380px);
    min-height: 70vh;
    padding: 22px 0 54px;
    color: var(--tw-account-ink);
}

.tw-account-modern > .container:first-child,
.tw-account-modern .container.rtl:first-child {
    margin-top: 0 !important;
}

.tw-account-modern .headerTitle,
.tw-account-modern .sidebar_heading .headerTitle {
    color: var(--tw-account-navy) !important;
    font-size: clamp(24px, 2.2vw, 34px) !important;
    font-weight: 800 !important;
    letter-spacing: -.03em;
    text-align: left !important;
    padding: 10px 0 18px !important;
}

.tw-account-modern .row {
    align-items: flex-start;
}

/* Shared account sidebar */
.tw-account-sidebar {
    position: sticky;
    top: 92px;
    overflow: hidden;
    background: var(--tw-account-white);
    border: 1px solid var(--tw-account-line);
    border-radius: 22px;
    box-shadow: var(--tw-account-shadow);
}

.tw-account-user-card {
    display: flex;
    gap: 13px;
    align-items: center;
    min-height: 116px;
    padding: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 0, rgba(255,255,255,.22), transparent 40%),
        linear-gradient(135deg, var(--tw-account-blue), var(--tw-account-navy));
}

.tw-account-avatar-wrap {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    padding: 3px;
    border-radius: 18px;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.35);
}

.tw-account-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: #fff;
}

.tw-account-user-copy { min-width: 0; }
.tw-account-user-copy h4 {
    overflow: hidden;
    margin: 2px 0 3px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tw-account-user-copy p {
    overflow: hidden;
    margin: 0;
    max-width: 155px;
    color: rgba(255,255,255,.74);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tw-account-kicker {
    display: block;
    color: rgba(255,255,255,.72);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tw-account-nav {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.tw-account-nav-link {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 7px 10px;
    color: #4a5670 !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 13px;
    transition: .2s ease;
}
.tw-account-nav-link:hover {
    color: var(--tw-account-blue) !important;
    background: #f1f4ff;
    transform: translateX(2px);
}
.tw-account-nav-link.active-menu {
    color: var(--tw-account-blue) !important;
    background: linear-gradient(90deg, rgba(0,7,163,.11), rgba(0,7,163,.04));
    box-shadow: inset 3px 0 0 var(--tw-account-blue);
}
.tw-account-nav-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--tw-account-blue);
    background: #eef1ff;
    border-radius: 11px;
    font-size: 16px;
}
.tw-account-nav-link.active-menu .tw-account-nav-icon {
    color: #fff;
    background: var(--tw-account-blue);
}
.tw-account-nav-arrow {
    color: #a9b2c5;
    font-size: 11px;
}
.tw-account-nav-divider {
    height: 1px;
    margin: 6px 8px;
    background: var(--tw-account-line);
}

/* Main cards */
.tw-account-modern .card,
.tw-account-modern .__customer-profile .card,
.tw-account-modern .__account-address .card,
.tw-account-modern .card.box-shadow-sm {
    overflow: hidden;
    border: 1px solid var(--tw-account-line) !important;
    border-radius: var(--tw-account-radius) !important;
    background: #fff;
    box-shadow: var(--tw-account-shadow) !important;
}

.tw-account-modern .card-header {
    padding: 20px 22px;
    background: #fff !important;
    border-bottom: 1px solid var(--tw-account-line) !important;
}
.tw-account-modern .card-body { padding: 22px; }
.tw-account-modern .card-footer {
    background: #fff;
    border-top: 1px solid var(--tw-account-line);
}

.tw-account-modern .font-nameA,
.tw-account-modern .font-name,
.tw-account-modern h3,
.tw-account-modern h4,
.tw-account-modern h5 {
    color: var(--tw-account-navy);
}

.tw-account-modern .photoHeader {
    align-items: center;
    padding: 4px 0 18px;
    border-bottom: 1px solid var(--tw-account-line);
}
.tw-account-modern .photoHeader img,
.tw-account-modern #blah {
    width: 78px !important;
    height: 78px !important;
    object-fit: cover;
    border: 4px solid #fff !important;
    box-shadow: 0 0 0 1px var(--tw-account-line), 0 10px 22px rgba(11,35,91,.12);
}
.tw-account-modern .profileInputDiv {
    padding-top: 20px !important;
}

/* Inputs and controls */
.tw-account-modern label {
    margin-bottom: 7px;
    color: #39445c;
    font-size: 12px;
    font-weight: 800;
}
.tw-account-modern .form-control,
.tw-account-modern .filter-option,
.tw-account-modern select,
.tw-account-modern textarea {
    min-height: 48px;
    color: var(--tw-account-ink);
    background: #fbfcff !important;
    border: 1px solid #dce3ef !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
.tw-account-modern textarea.form-control { min-height: 110px; }
.tw-account-modern .form-control:focus,
.tw-account-modern select:focus,
.tw-account-modern textarea:focus {
    background: #fff !important;
    border-color: rgba(0,7,163,.55) !important;
    box-shadow: 0 0 0 4px rgba(0,7,163,.08) !important;
}
.tw-account-modern .inputFeald {
    overflow: hidden;
    border-radius: 12px;
    background: #fbfcff;
    border: 1px solid #dce3ef;
}
.tw-account-modern .inputFeald .form-control {
    border: 0 !important;
}
.tw-account-modern .inputFeald i {
    color: var(--tw-account-blue);
}

/* Buttons */
.tw-account-modern .btn,
.tw-account-modern .btn--primary,
.tw-account-modern button[type="submit"] {
    min-height: 44px;
    padding: 10px 18px;
    font-weight: 800;
    border-radius: 12px !important;
}
.tw-account-modern .btn--primary,
.tw-account-modern button[type="submit"].btn--primary,
.tw-account-modern .btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--tw-account-blue), #2437d8) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 24px rgba(0,7,163,.2);
}
.tw-account-modern .btn-secondary,
.tw-account-modern .btn-outline-secondary {
    color: #3e4960;
    background: #fff;
    border: 1px solid var(--tw-account-line);
}

/* Wallet / reward summary cards */
.tw-account-modern .wallet-card,
.tw-account-modern .wallet-balance-card,
.tw-account-modern [class*="wallet"] .card-header,
.tw-account-modern .loyalty-card {
    border-radius: 16px;
}
.tw-account-modern .card-header h3,
.tw-account-modern .card-header h4,
.tw-account-modern .card-header h5 {
    margin-bottom: 0;
    font-weight: 800;
}

/* Tables */
.tw-account-modern .table-responsive {
    border-radius: 14px;
}
.tw-account-modern table.table {
    margin: 0;
    color: #35405a;
    background: #fff;
    border: 0 !important;
}
.tw-account-modern table.table thead,
.tw-account-modern table.table .thead-light {
    background: #f4f6fb !important;
}
.tw-account-modern table.table thead tr,
.tw-account-modern table.table thead td,
.tw-account-modern table.table thead th {
    color: #4d5870 !important;
    background: #f4f6fb !important;
    border: 0 !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.tw-account-modern table.table td,
.tw-account-modern table.table th,
.tw-account-modern .bodytr {
    padding: 15px 14px !important;
    vertical-align: middle;
    border-color: #edf0f6 !important;
}
.tw-account-modern table.table tbody tr:hover {
    background: #fafbff;
}
.tw-account-modern .tdBorder { border-right: 0 !important; border-left: 0 !important; }
.tw-account-modern .spandHeadO { color: #4d5870 !important; font-weight: 800; }

/* Address cards and modal */
.tw-account-modern .__account-address .card,
.tw-account-modern .address-card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.tw-account-modern .__account-address .card:hover,
.tw-account-modern .address-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(19,33,68,.12) !important;
}
.tw-account-modern .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(7,20,58,.2);
}
.tw-account-modern .modal-header,
.tw-account-modern .modal-footer {
    padding: 18px 22px;
    background: #fff;
    border-color: var(--tw-account-line);
}
.tw-account-modern .modal-body { padding: 22px; }
.tw-account-modern .donate-now label {
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid var(--tw-account-line);
    border-radius: 10px;
    background: #fff;
}

/* Pagination and empty states */
.tw-account-modern .pagination { gap: 6px; }
.tw-account-modern .page-link {
    border: 1px solid var(--tw-account-line);
    border-radius: 10px !important;
}
.tw-account-modern center {
    padding: 34px 16px;
    color: var(--tw-account-muted);
}

@media (max-width: 991.98px) {
    .tw-account-modern { padding-top: 14px; }
    .tw-account-sidebar { position: static; margin-bottom: 18px; }
    .tw-account-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px;
        scrollbar-width: thin;
    }
    .tw-account-nav-link {
        flex: 0 0 auto;
        grid-template-columns: 32px auto;
        min-width: max-content;
        padding-right: 14px;
    }
    .tw-account-nav-arrow,
    .tw-account-nav-divider { display: none; }
    .tw-account-user-card { min-height: 98px; }
}

@media (max-width: 575.98px) {
    .tw-account-modern { padding-bottom: 30px; }
    .tw-account-modern .container { padding-left: 14px; padding-right: 14px; }
    .tw-account-modern .headerTitle { font-size: 25px !important; text-align: left !important; }
    .tw-account-modern .card-header,
    .tw-account-modern .card-body { padding: 16px; }
    .tw-account-user-card { padding: 16px; }
    .tw-account-modern table.table { min-width: 620px; }
    .tw-account-modern .form-row { display: block; }
    .tw-account-modern .form-row > [class*="col-"] { max-width: 100%; }
}


/* Pack 7A: keep the shared account panel identical on every linked account page. */
body .sidebarR .tw-account-sidebar {
    width: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tw-account-line);
    border-radius: 22px;
    box-shadow: var(--tw-account-shadow);
}

body .sidebarR .tw-account-nav {
    display: grid;
    gap: 4px;
    padding: 12px;
    margin: 0;
}

body .sidebarR .tw-account-nav-link {
    text-decoration: none !important;
}

body .sidebarR .tw-account-nav-link.active-menu,
body .sidebarR .tw-account-nav-link.active-menu:hover,
body .sidebarR .tw-account-nav-link.active-menu:focus {
    color: #0007a3 !important;
    background: linear-gradient(90deg, rgba(0, 7, 163, .13), rgba(0, 7, 163, .045)) !important;
    box-shadow: inset 4px 0 0 #0007a3 !important;
    transform: none;
}

body .sidebarR .tw-account-nav-link.active-menu .tw-account-nav-icon {
    color: #fff !important;
    background: #0007a3 !important;
}

/* Prevent legacy profile-aside rules from turning the navigation into plain inline text. */
body .sidebarR .tw-account-user-card {
    display: flex !important;
}

body .sidebarR .tw-account-nav-link {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) 14px !important;
    align-items: center !important;
}

@media (max-width: 991.98px) {
    body .sidebarR .tw-account-nav {
        display: flex !important;
        overflow-x: auto;
    }

    body .sidebarR .tw-account-nav-link {
        display: grid !important;
        grid-template-columns: 32px auto !important;
    }
}
