* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1769e0;
    --sidebar: #07152d;
    --text: #172033;
    --muted: #718096;
    --light: #f5f7fb;
    --border: #e5e9f0;
    --white: #ffffff;
    --danger: #d64545;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font-family: inherit;
}

.withdraw-page {
    min-height: 100vh;
    display: flex;
}


/* ========================================
   SIDEBAR
======================================== */

.sidebar {
    width: 255px;
    min-height: 100vh;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    z-index: 100;

    padding: 28px 14px 22px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    color: #ffffff;

    background: linear-gradient(
        180deg,
        #07152d 0%,
        #0b2552 55%,
        #1554a7 100%
    );
}

.sidebar-brand {
    display: block;

    padding: 0 12px 25px;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;
}

.sidebar-brand span {
    color: #48d4dc;
}

.sidebar-user {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px 12px;
    margin-bottom: 30px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #2ac4ce;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 800;
}

.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-user-info strong {
    overflow: hidden;

    font-size: 13px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    margin-top: 2px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 11px;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    padding: 0 13px;
    margin-bottom: 9px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.sidebar .sidebar-label {
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border-radius: 8px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 13px;
    font-weight: 600;

    transition: 0.2s;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: #ffffff;

    background: linear-gradient(
        90deg,
        rgba(52, 202, 215, 0.75),
        rgba(23, 105, 224, 0.75)
    );
}

.nav-icon {
    width: 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
}

.sidebar-logout {
    width: 100%;
    min-height: 45px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: rgba(255, 255, 255, 0.72);

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;

    text-align: left;
}

.sidebar-logout:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}


/* ========================================
   MAIN
======================================== */

.withdraw-main {
    width: calc(100% - 255px);

    min-height: 100vh;

    margin-left: 255px;
}


/* ========================================
   TOPBAR
======================================== */

.topbar {
    min-height: 88px;

    padding: 22px 45px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    background: #ffffff;

    border-bottom: 1px solid var(--border);
}

.page-label {
    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.topbar h1 {
    margin-top: 3px;

    font-size: 25px;
}

.topbar-user {
    display: flex;
    align-items: center;

    gap: 10px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--primary);
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 800;
}

.topbar-user div:last-child {
    display: flex;
    flex-direction: column;
}

.topbar-user strong {
    font-size: 13px;
}

.topbar-user span {
    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}


/* ========================================
   CONTENT
======================================== */

.withdraw-content {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    padding: 38px 40px 60px;
}


/* ========================================
   INTRO
======================================== */

.intro-card {
    padding: 30px;

    margin-bottom: 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.035);
}

.intro-card h2 {
    margin: 5px 0 8px;

    font-size: 27px;
}

.intro-card p:last-child {
    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}


/* ========================================
   BALANCE
======================================== */

.balance-card {
    padding: 22px 25px;

    margin-bottom: 20px;

    border-radius: 12px;

    background: #edf4ff;

    border: 1px solid #d8e7ff;
}

.balance-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.balance-card span {
    color: var(--muted);

    font-size: 13px;
}

.balance-card strong {
    color: var(--primary);

    font-size: 19px;
}


/* ========================================
   FORM
======================================== */

.form-card {
    padding: 30px;

    border-radius: 14px;

    background: #ffffff;

    border: 1px solid var(--border);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.035);
}

.section-heading {
    margin-bottom: 25px;
}

.section-heading h2 {
    margin-top: 5px;

    font-size: 21px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;
}

.form-group small {
    display: block;

    margin-top: 7px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;

    height: 52px;

    padding: 0 65px 0 15px;

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    color: var(--text);

    font-size: 14px;

    transition: 0.2s;
}

.input-wrapper input:focus,
.form-group > input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, 0.08);
}

.input-wrapper span {
    position: absolute;

    right: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--muted);

    font-size: 12px;
    font-weight: 700;
}

.form-group > input {
    width: 100%;

    height: 52px;

    padding: 0 15px;

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    color: var(--text);

    font-size: 14px;

    transition: 0.2s;
}


/* ========================================
   CURRENCY
======================================== */

.currency-display {
    min-height: 65px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #fafbfe;
}

.currency-icon {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: #edf4ff;

    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: 800;
}

.currency-display div:last-child {
    display: flex;
    flex-direction: column;
}

.currency-display strong {
    font-size: 13px;
}

.currency-display span {
    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}


/* ========================================
   SUMMARY
======================================== */

.withdraw-summary {
    padding: 18px;

    margin: 25px 0;

    border-radius: 10px;

    background: #f7f9fc;

    border: 1px solid var(--border);
}

.summary-row {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid var(--border);

    font-size: 12px;
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-row span {
    color: var(--muted);
}

.summary-row strong {
    text-align: right;
}

.summary-address {
    max-width: 400px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.total-row {
    padding-top: 5px;
}

.total-row strong {
    color: var(--primary);
}


/* ========================================
   MESSAGE
======================================== */

.form-message {
    display: none;

    padding: 12px 14px;

    margin-bottom: 16px;

    border-radius: 8px;

    font-size: 12px;

    line-height: 1.5;
}

.form-message.error {
    display: block;

    color: #9f3030;

    background: #fff0f0;

    border: 1px solid #ffd2d2;
}

.form-message.success {
    display: block;

    color: #176b42;

    background: #edfff5;

    border: 1px solid #c8f1da;
}


/* ========================================
   BUTTON
======================================== */

.withdraw-button {
    width: 100%;

    min-height: 52px;

    border: 0;
    border-radius: 9px;

    background: var(--primary);
    color: #ffffff;

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;

    transition: 0.2s;
}

.withdraw-button:hover {
    background: #0f56bd;
}

.withdraw-button:disabled {
    opacity: 0.65;

    cursor: not-allowed;
}


/* ========================================
   NOTICE
======================================== */

.notice-card {
    display: flex;

    gap: 14px;

    padding: 20px;

    margin-top: 18px;

    border-radius: 12px;

    background: #fffaf0;

    border: 1px solid #f3e4bd;
}

.notice-icon {
    width: 30px;
    height: 30px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #f3c969;

    color: #604700;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
}

.notice-card h3 {
    margin-bottom: 5px;

    font-size: 13px;
}

.notice-card p {
    color: #766548;

    font-size: 11px;

    line-height: 1.6;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 800px) {

    .withdraw-page {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;

        position: relative;

        padding: 18px;

        display: block;
    }

    .sidebar-brand {
        padding: 0 5px 18px;
    }

    .sidebar-user {
        margin-bottom: 18px;
    }

    .sidebar-section {
        margin-bottom: 15px;
    }

    .sidebar-nav {
        display: grid;

        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-logout {
        margin-top: 10px;
    }

    .withdraw-main {
        width: 100%;

        margin-left: 0;
    }

    .topbar {
        padding: 20px;
    }

    .withdraw-content {
        padding: 25px 18px 45px;
    }
}


@media (max-width: 500px) {

    .topbar {
        align-items: flex-start;

        flex-direction: column;
    }

    .topbar-user {
        width: 100%;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .intro-card,
    .form-card {
        padding: 23px;
    }

    .balance-card div {
        align-items: flex-start;

        flex-direction: column;
    }

    .summary-row {
        align-items: flex-start;

        flex-direction: column;

        justify-content: center;

        gap: 5px;

        padding: 10px 0;
    }

    .summary-address {
        max-width: 100%;
    }

}