:root {
    --purple: #5d4a84;
    --purple-dark: #44305f;
    --purple-panel: #4d3a64;
    --mauve: #a06b91;
    --orange: #ff9800;
    --orange-dark: #f07f00;
    --ink: #15151f;
    --muted: #6b6473;
    --line: #e7e2ec;
    --soft: #f7f4fa;
    --white: #ffffff;
    --shadow: 0 18px 42px rgba(38, 25, 55, .14);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    width: min(1460px, calc(100% - 64px));
    margin: 0 auto;
}

.site-header {
    position: relative;
    z-index: 50;
    width: 100%;
    background: var(--white);
}

.top-bar {
    background: var(--purple);
    color: var(--white);
}

.top-bar-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.top-contact {
    display: flex;
    align-items: center;
    gap: 34px;
    flex-wrap: wrap;
    font-size: 20px;
    font-weight: 500;
}

.contact-link,
.account-button {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.contact-link svg,
.account-button svg,
.feature-icon svg {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    fill: var(--orange);
}

.account-button {
    min-height: 58px;
    padding: 0 34px;
    border-radius: 12px;
    background: #000;
    color: var(--white);
    font-size: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.main-header {
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
}

.header-inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #000;
    text-decoration: none;
}

.brand-logo {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.brand-text span {
    font-size: 14px;
    font-weight: 700;
    color: #4f4f5a;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #050505;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--orange);
}

.menu-toggle {
    display: none;
    width: 76px;
    height: 58px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 58px;
    height: 4px;
    margin: 10px auto;
    border-radius: 999px;
    background: #000;
}

main {
    min-height: 60vh;
}

.home-hero {
    position: relative;
    overflow: hidden;
    min-height: 570px;
    color: var(--white);
    background:
        linear-gradient(180deg, rgba(93, 74, 132, .96), rgba(160, 107, 145, .96)),
        var(--purple);
}

.hero-grid {
    min-height: 570px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .95fr);
    align-items: center;
    gap: 70px;
    padding: 52px 0 48px;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--orange);
    font-weight: 800;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    max-width: 820px;
    color: var(--white);
    font-size: clamp(44px, 5vw, 72px);
    line-height: 1.03;
    font-weight: 900;
}

.hero-subtitle {
    max-width: 780px;
    margin: 14px 0 28px;
    color: rgba(255, 255, 255, .92);
    font-size: clamp(20px, 2.4vw, 32px);
    line-height: 1.45;
    font-style: italic;
}

.hero-features {
    display: grid;
    gap: 18px;
    max-width: 780px;
}

.hero-feature {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 24px;
    border-radius: 8px;
    background: rgba(51, 35, 67, .58);
    color: var(--white);
    font-size: 25px;
    line-height: 1.2;
}

.feature-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
}

.feature-icon svg {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: var(--white);
    stroke-width: 1.8;
}

.hero-actions,
.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-green {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 8px 16px rgba(255, 152, 0, .24);
}

.btn-primary:hover,
.btn-green:hover {
    background: var(--orange-dark);
}

.btn-light,
.btn-outline {
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    border-color: rgba(255, 255, 255, .62);
}

.soft .btn-outline,
.panel .btn-outline,
.form-box .btn-outline,
.card .btn-outline,
section:not(.home-hero) .btn-outline {
    background: var(--white);
    color: var(--purple);
    border-color: var(--line);
}

.hero-price {
    margin-top: 24px;
    display: grid;
    gap: 4px;
    color: var(--white);
}

.hero-price span {
    font-size: 30px;
}

.hero-price strong {
    font-size: 34px;
}

.hero-visual {
    position: relative;
    min-height: 430px;
}

.cloud {
    position: absolute;
    height: 54px;
    border-radius: 999px;
    background: var(--white);
    filter: drop-shadow(0 4px 1px rgba(0, 0, 0, .08));
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: var(--white);
}

.cloud-one {
    width: 150px;
    top: 56px;
    right: 40px;
}

.cloud-one::before {
    width: 78px;
    height: 78px;
    left: 28px;
}

.cloud-one::after {
    width: 58px;
    height: 58px;
    right: 24px;
}

.cloud-two {
    width: 280px;
    right: 116px;
    bottom: -24px;
}

.cloud-two::before {
    width: 130px;
    height: 130px;
    left: 56px;
}

.cloud-two::after {
    width: 88px;
    height: 88px;
    right: 34px;
}

.visual-badge {
    position: absolute;
    top: 180px;
    left: 24px;
    width: 162px;
    height: 162px;
    display: grid;
    place-items: center;
    border: 8px solid #26202b;
    border-radius: 50%;
    background: #ffd36a;
    color: #141414;
    font-size: 28px;
    font-weight: 900;
    transform: rotate(-11deg);
    box-shadow: var(--shadow);
}

.visual-badge::after {
    content: "MEMBER";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 57%;
    padding: 8px 0;
    background: var(--orange);
    border: 4px solid #26202b;
    font-size: 18px;
}

.member-card-visual {
    position: absolute;
    left: 0;
    bottom: 22px;
    width: 300px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.member-card-visual img {
    width: 72px;
    height: 72px;
}

.member-card-visual span {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.member-card-visual strong {
    display: block;
    color: var(--purple);
    font-size: 26px;
}

.launch-mark {
    position: absolute;
    right: 150px;
    bottom: 86px;
    width: 150px;
    height: 280px;
}

.launch-body {
    position: absolute;
    inset: 0 30px 52px;
    border-radius: 70px 70px 30px 30px;
    background:
        linear-gradient(125deg, #e52222 0 27%, transparent 27%),
        linear-gradient(90deg, transparent 0 42%, #e52222 42% 58%, transparent 58%),
        #fdfdfd;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .18);
}

.launch-body::before,
.launch-body::after {
    content: "";
    position: absolute;
    bottom: 18px;
    width: 64px;
    height: 94px;
    background: #e52222;
    z-index: -1;
}

.launch-body::before {
    left: -48px;
    border-radius: 70px 0 0 18px;
    transform: skewY(-18deg);
}

.launch-body::after {
    right: -48px;
    border-radius: 0 70px 18px 0;
    transform: skewY(18deg);
}

.launch-window {
    position: absolute;
    top: 88px;
    left: 50%;
    width: 58px;
    height: 58px;
    border: 8px solid #3b3b3b;
    border-radius: 50%;
    background: #38c4dc;
    transform: translateX(-50%);
}

.launch-flame {
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 58px;
    height: 100px;
    border-radius: 50% 50% 50% 50%;
    background: linear-gradient(#ffb347, #ff7a00 58%, transparent 59%);
    transform: translateX(-50%);
}

section {
    padding: 70px 0;
}

.soft {
    background: var(--soft);
}

.align-center {
    align-items: center;
}

h2 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
}

.lead {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 22px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.panel,
.card,
.form-box {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel,
.form-box {
    padding: 28px;
}

.card {
    padding: 24px;
}

.metric-card,
.contact-card {
    min-height: 148px;
    display: grid;
    align-content: center;
    gap: 10px;
}

.metric-card strong,
.contact-card strong {
    color: var(--purple);
    font-size: 18px;
}

.metric-card span,
.contact-card span {
    font-size: 20px;
    font-weight: 800;
}

label {
    display: block;
    margin: 0 0 7px;
    font-weight: 800;
}

.field {
    margin-bottom: 16px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    padding: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.stats .card {
    min-height: 112px;
    color: var(--white);
}

.stat-pink {
    background: var(--mauve);
}

.stat-green {
    background: #168044;
}

.stat-dark {
    background: var(--purple-dark);
}

.stat-orange {
    background: var(--orange);
}

table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    background: var(--white);
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    background: #f3f1f7;
}

.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.active {
    background: #dcfce7;
    color: #166534;
}

.pending {
    background: #fef3c7;
    color: #92400e;
}

.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.flash {
    margin-top: 16px;
    border-radius: 8px;
    padding: 14px 18px;
    font-weight: 800;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

.id-card {
    width: min(720px, 100%);
    margin: auto;
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--white);
}

.id-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--purple);
    color: var(--white);
}

.id-title {
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 900;
}

.id-body {
    display: grid;
    grid-template-columns: 130px 1fr 130px;
    gap: 16px;
    padding: 18px;
}

.photo{
    width:140px;
    height:170px;
    border:1px solid #ddd;
    border-radius:6px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f5f5f5;
    font-weight:bold;
}

.photo img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.qr {
    width: 118px;
    height: 118px;
    border: 8px solid var(--white);
    outline: 1px solid var(--line);
    background:
        linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 20px 20px,
        linear-gradient(#111 10px, transparent 10px) 0 0 / 20px 20px,
        var(--white);
}

.row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    margin-bottom: 7px;
}

.id-bottom {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: #168044;
    color: var(--white);
    font-weight: 900;
}

footer {
    background: var(--purple-dark);
    color: var(--white);
    padding: 30px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

@media (max-width: 1120px) {
    .container {
        width: min(100% - 48px, 1060px);
    }

    .top-contact {
        font-size: 18px;
        gap: 22px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 15px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-copy {
        max-width: 840px;
    }

    .hero-visual {
        display: none;
    }
}

@media (max-width: 860px) {
    .container {
        width: calc(100% - 34px);
    }

    .top-bar-inner {
        min-height: 96px;
        gap: 16px;
    }

    .top-contact {
        flex: 1 1 auto;
        gap: 8px;
        font-size: 16px;
    }

    .contact-link {
        min-width: 100%;
    }

    .account-button {
        min-height: 48px;
        padding: 0 20px;
        border-radius: 12px;
        font-size: 16px;
    }

    .contact-link svg,
    .account-button svg {
        width: 25px;
        height: 25px;
    }

    .header-inner {
        min-height: 144px;
    }

    .brand-logo {
        width: 96px;
        height: 96px;
    }

    .brand-text strong {
        font-size: clamp(28px, 8vw, 48px);
    }

    .brand-text span {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 14px 24px 24px;
        background: var(--white);
        box-shadow: 0 12px 22px rgba(0, 0, 0, .14);
    }

    .nav-links.show {
        display: grid;
        gap: 4px;
    }

    .nav-links a {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        border-bottom: 1px solid var(--line);
    }

    .home-hero,
    .hero-grid {
        min-height: auto;
    }

    .hero-grid {
        display: block;
        padding: 72px 0 42px;
    }

    .hero-copy h1 {
        font-size: clamp(40px, 9vw, 62px);
    }

    .hero-subtitle {
        font-size: clamp(22px, 5vw, 36px);
    }

    .hero-feature {
        min-height: 70px;
        padding: 14px 18px;
        font-size: clamp(21px, 5vw, 31px);
    }

    .hero-actions {
        margin-top: 34px;
    }

    .hero-actions .btn {
        min-width: 260px;
        min-height: 74px;
        font-size: 25px;
        border-radius: 8px;
    }

    .hero-price span {
        font-size: clamp(34px, 8vw, 54px);
    }

    .hero-price strong {
        font-size: clamp(31px, 7vw, 46px);
    }

    .hero-visual {
        display: none;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .info-grid,
    .id-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container {
        width: calc(100% - 28px);
    }

    .top-bar-inner {
        min-height: 76px;
        gap: 10px;
    }

    .top-contact {
        font-size: 14px;
    }

    .account-button {
        padding: 0 14px;
    }

    .account-button span {
        display: none;
    }

    .header-inner {
        min-height: 104px;
    }

    .brand-logo {
        width: 74px;
        height: 74px;
    }

    .menu-toggle {
        width: 58px;
    }

    .menu-toggle span {
        width: 44px;
        height: 4px;
        margin: 8px auto;
    }

    .hero-grid {
        padding-top: 58px;
    }

    .hero-feature {
        gap: 14px;
    }

    .feature-icon {
        width: 42px;
        height: 42px;
    }

    .feature-icon svg {
        width: 38px;
        height: 38px;
    }

    .hero-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .row {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 10px;
        font-size: 13px;
    }
}

@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }

    section {
        padding: 0;
    }

    body {
        background: var(--white);
    }
}

/* ===== MOBILE FIXES ===== */

/* Table horizontal scroll */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
}

/* Actions button row — wrap on mobile */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

/* Mobile panel padding */
@media (max-width: 640px) {
    .panel,
    .form-box {
        padding: 16px 14px;
    }
    .card {
        padding: 16px;
    }
    section {
        padding: 30px 0;
    }
    .actions {
        gap: 8px;
    }
    .actions .btn,
    .actions button,
    .actions a.btn {
        font-size: 13px;
        padding: 8px 14px;
        min-height: 38px;
    }
    /* Admin stats: 2 per row on small screens */
    .grid-4.stats {
        grid-template-columns: 1fr 1fr !important;
    }
    /* member detail lead text */
    .lead {
        font-size: 15px;
    }
    /* smaller h2 in panels */
    .panel h2 {
        font-size: 22px;
    }
}

/* Status badge styles */
.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.status-pending  { background: #fef3c7; color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* Profile photo in member detail */
.profile-photo {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--line);
}

/* OTP input */
.otp-box {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.otp-box input[type=text] {
    width: 52px;
    height: 58px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    border: 2px solid #cfd4dc;
    border-radius: 8px;
    padding: 0;
}
.otp-box input[type=text]:focus {
    border-color: var(--purple);
    outline: none;
}

/* ===== ADMIN PANEL MOBILE TABLE FIX ===== */
.table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
}
.table-wrap table {
    min-width: 660px;
    width: 100%;
}

@media (max-width: 768px) {
    .grid-4.stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }
    .stats .card {
        min-height: 90px;
        padding: 14px;
    }
    .stats .card h3 {
        font-size: 26px;
        margin: 6px 0 0;
    }
    .stats .card strong {
        font-size: 13px;
    }
    .panel { padding: 16px 12px !important; }
    .form-box { padding: 16px 12px !important; }
    section { padding: 24px 0 !important; }
    h2 { font-size: 24px !important; }
    .actions { gap: 8px !important; flex-wrap: wrap !important; }
    .actions .btn,
    .actions a.btn,
    .actions button { font-size: 13px !important; padding: 8px 12px !important; min-height: 36px !important; }
}
