/* =====================================================
   YKB Clothing — My Account
   Design language: streetwear / Gen Z drop.
   Tokens shared with cart.css, checkout.css, orders.css, wishlist.css
   ----------------------------------------------------- */

:root{
    --teal:      #088178;
    --teal-dark: #066b63;
    --teal-tint: #e6f6f4;
    --ink:       #0e1414;
    --ink-70:    rgba(14,20,20,.68);
    --stone:     #9aa3a2;
    --line:      rgba(8,129,120,.22);
    --white:     #ffffff;
    --pop:       #ff5a4e;
    --pop-dark:  #d6473d;

    --font-display: "Space Grotesk", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "Space Mono", monospace;

    --radius-lg: 20px;
    --radius-sm: 10px;
    --shadow-card: 0 16px 32px rgba(8,129,120,.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--teal-tint);
    color: var(--ink);
}

/* LAYOUT */
.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: var(--ink);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;

    /* Fixed so it stays put while .main scrolls */
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar h2 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
    margin: 0 0 28px;
    font-size: 22px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 4px 0;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: background .2s ease, color .2s ease;
}

.sidebar a.active,
.sidebar a:hover {
    background: rgba(8,129,120,.24);
    color: var(--white);
}

.logout {
    margin-top: auto;
    background: var(--pop);
    border: none;
    padding: 12px 14px;
    color: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .2s ease;
}

.logout:hover {
    background: var(--pop-dark);
}

/* MAIN */
.main {
    flex: 1;
    margin-left: 220px;
    padding: 40px;
    max-width: 900px;
}

/* HEADER */
.header-card {
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.banner {
    height: 120px;
    background: var(--teal);
    position: relative;
    overflow: hidden;
}

.banner::before{
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -140px;
    right: -60px;
    background: rgba(255,255,255,.14);
    border-radius: 62% 38% 55% 45% / 45% 60% 40% 55%;
}

/* PROFILE SECTION */
.profile-section {
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 22px;
    flex-wrap: wrap;
}

/* AVATAR */
.avatar-wrapper {
    position: relative;
    margin-top: -50px;
}

#profile-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid var(--white);
    object-fit: cover;
    background: var(--teal-tint);
    box-shadow: 0 8px 20px rgba(8,129,120,.2);
}

/* CAMERA */
.camera {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--teal);
    color: var(--white);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    border: 2px solid var(--white);
    transition: background .2s ease;
}

.camera:hover {
    background: var(--teal-dark);
}

/* INFO */
.info h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--ink);
}

.info p {
    color: var(--ink-70);
    font-size: 13.5px;
    margin: 4px 0 12px;
}

.info button {
    padding: 10px 18px;
    border: none;
    background: var(--ink);
    color: var(--white);
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .2s ease, transform .2s ease;
}

.info button:hover {
    background: var(--teal);
    transform: translateY(-2px);
}

/* STATS */
.stats {
    display: flex;
    gap: 16px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 140px;
    background: var(--white);
    border: 1.5px solid var(--line);
    padding: 22px;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow-card);
}

.card h3 {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 24px;
    color: var(--teal-dark);
    margin: 0 0 4px;
}

.card p {
    color: var(--ink-70);
    font-size: 13px;
    margin: 0;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14,20,20,.55);
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
}

.modal-box {
    background: var(--white);
    color: var(--ink);
    padding: 28px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 340px;
    box-shadow: 0 30px 70px rgba(0,0,0,.28);
}

.modal-box h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    margin: 0 0 18px;
}

.field {
    margin-bottom: 14px;
}

.modal-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease;
}

.modal-box input:focus {
    border-color: var(--teal);
}

.modal-box input.has-error {
    border-color: var(--pop);
}

.field-error {
    display: block;
    min-height: 16px;
    font-size: 12px;
    color: var(--pop-dark);
    margin-top: 5px;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.save-btn,
.cancel-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13.5px;
    transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.save-btn {
    background: var(--teal);
    color: var(--white);
}

.save-btn:hover:not(:disabled) {
    background: var(--teal-dark);
    transform: translateY(-2px);
}

.save-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: var(--teal-tint);
    color: var(--ink-70);
}

.cancel-btn:hover {
    background: var(--line);
}

/* TOASTS */

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
}

.toast {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 14px 28px rgba(0,0,0,.22);
    animation: slideIn .3s ease;
    max-width: 300px;
}

.toast.toast--success{ background: var(--teal-dark); }
.toast.toast--error{ background: var(--pop-dark); }

.toast.is-leaving{
    animation: slideOut .25s ease forwards;
}

@keyframes slideIn{
    from{ transform: translateX(100%); opacity: 0; }
    to{ transform: translateX(0); opacity: 1; }
}

@keyframes slideOut{
    from{ transform: translateX(0); opacity: 1; }
    to{ transform: translateX(100%); opacity: 0; }
}

/* MOBILE */

@media(max-width: 900px){

    .sidebar {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 16px 20px;
    }

    .sidebar h2 {
        margin: 0;
    }

    .sidebar a {
        margin: 0;
        padding: 8px 12px;
        font-size: 13px;
    }

    .logout {
        margin-top: 0;
        margin-left: auto;
        padding: 8px 12px;
    }

    .main {
        margin-left: 0;
        padding: 24px 20px;
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .avatar-wrapper {
        margin-top: -60px;
    }

    .toast-stack{
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast{
        max-width: none;
    }
}
/* =========================================================
   PROFILE SIDEBAR NAVIGATION
========================================================= */

.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    margin-bottom: 35px;
}

.sidebar-brand h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 34px;
    font-weight: 700;
}

.sidebar-brand span {
    display: block;
    margin-top: 4px;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #aebfbe;
    opacity: 1;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 13px 15px;
    border-radius: 12px;
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 600;
    transition: .25s ease;
}

.profile-nav a i {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.profile-nav a:hover {
    background: rgba(0, 191, 166, .10);
    color: #00bfa6;
    transform: translateX(3px);
}

.profile-nav a.active {
    background: #00bfa6;
    color: #fff;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 30px;
}

.logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 77, 109, .2);
    border-radius: 12px;
    background: rgba(255, 77, 109, .08);
    color: #ff4d6d;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
}

.logout i {
    width: 22px;
    text-align: center;
}

.logout:hover {
    background: #ff4d6d;
    color: #fff;
    transform: translateY(-2px);
}
/* =========================================================
   PROFILE MOBILE
========================================================= */

@media (max-width: 768px) {

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
        padding: 20px;
    }

    .sidebar-brand {
        margin-bottom: 18px;
    }

    .sidebar-brand h2 {
        font-size: 28px;
    }

    .profile-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .profile-nav a {
        justify-content: flex-start;
    }

    .sidebar-bottom {
        margin-top: 12px;
        padding-top: 0;
    }

    .logout {
        justify-content: center;
    }

    .main {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .profile-nav {
        grid-template-columns: 1fr 1fr;
    }

    .profile-nav a {
        font-size: 13px;
        padding: 12px;
    }

    .profile-nav a i {
        font-size: 14px;
    }

    .logout {
        font-size: 13px;
    }
}

/* =====================================================
   ACCOUNT DASHBOARD POLISH
===================================================== */
.main{
    width: min(100% - 220px, 1240px);
    max-width: 1240px;
    padding: 44px clamp(24px, 4vw, 64px) 70px;
}

.account-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin:0 0 28px;
}

.account-kicker,
.panel-heading > div:last-child > span{
    color:var(--teal);
    font:700 10px/1.4 var(--font-mono);
    letter-spacing:2px;
}

.account-heading h1{
    margin:7px 0 5px;
    color:var(--ink);
    font:700 clamp(30px, 4vw, 42px)/1.08 var(--font-display);
    letter-spacing:-1.2px;
}

.account-heading p{ margin:0; color:var(--ink-70); font-size:14px; }

.account-shop-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    white-space:nowrap;
    color:var(--teal-dark);
    text-decoration:none;
    font-size:13px;
    font-weight:700;
}

.account-shop-link:hover{ color:var(--teal); }

.header-card{
    border:0;
    background:var(--white);
    box-shadow:0 22px 55px rgba(14,20,20,.1);
}

.banner{
    height:150px;
    background:linear-gradient(115deg,#063e3a 0%,#088178 48%,#24a99a 100%);
}

.banner::after{
    content:"";
    position:absolute;
    width:300px;
    height:300px;
    right:18%;
    top:-210px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:50%;
    box-shadow:0 0 0 28px rgba(255,255,255,.035),0 0 0 58px rgba(255,255,255,.03);
}

.profile-section{ padding:0 32px 28px; gap:20px; }
.avatar-wrapper{ margin-top:-54px; }
#profile-image{ width:112px; height:112px; border-color:#fff; }
.info h2{ font-size:25px; letter-spacing:-.4px; }
.info p{ margin-bottom:9px; }

.member-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin:0 12px 0 0;
    color:var(--teal-dark);
    font-size:11px;
    font-weight:700;
}

.info button{ margin-top:13px; }

.stats{ gap:14px; margin-top:18px; }
.card{
    position:relative;
    min-height:128px;
    padding:20px 22px;
    border:1px solid rgba(8,129,120,.12);
    border-radius:16px;
    text-align:left;
    box-shadow:0 12px 30px rgba(14,20,20,.045);
}

.card > i{ color:var(--teal); font-size:17px; margin-bottom:18px; }
.card h3{ font:700 23px/1.2 var(--font-display); color:var(--ink); margin:0 0 5px; }
.card h3.status-value{ font-size:20px; color:var(--teal-dark); }
.card p{ color:var(--ink-70); font-size:12px; }

.account-panels{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    margin-top:16px;
}

.account-panel{
    min-width:0;
    padding:23px;
    border:1px solid rgba(8,129,120,.13);
    border-radius:16px;
    background:#fff;
    box-shadow:0 12px 30px rgba(14,20,20,.045);
}

.panel-heading{ display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.panel-icon{
    display:grid;
    place-items:center;
    flex:none;
    width:42px;
    height:42px;
    border-radius:13px;
    background:#e6f6f4;
    color:var(--teal);
}

.panel-heading h2{ margin:4px 0 0; font:700 17px/1.25 var(--font-display); color:var(--ink); }
.panel-heading > div:last-child > span{ font-size:9px; letter-spacing:1.2px; }
.profile-details{ margin:0; }
.profile-details > div{ padding:12px 0; border-top:1px solid rgba(8,129,120,.1); }
.profile-details dt{ margin-bottom:5px; color:#75817f; font-size:11px; font-weight:600; }
.profile-details dd{ margin:0; color:var(--ink); font-size:13px; font-weight:650; overflow-wrap:anywhere; }
.address-panel .panel-heading{ margin-bottom:17px; }
.panel-edit{
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    margin-left:auto;
    border:1px solid rgba(8,129,120,.2);
    border-radius:10px;
    background:#fff;
    color:var(--teal);
    cursor:pointer;
}
.panel-edit:hover{ background:#e6f6f4; }
.profile-address{
    display:flex;
    align-items:flex-start;
    gap:13px;
    min-height:78px;
    padding:17px;
    border-radius:12px;
    background:#f3f8f7;
    color:var(--teal-dark);
}
.profile-address > i{ margin-top:2px; }
.profile-address strong{ color:var(--ink); font-size:13px; }
.profile-address p{ margin:5px 0 0; color:var(--ink-70); font-size:12px; line-height:1.6; }

.modal-box{ max-width:500px; max-height:min(88vh,800px); overflow:auto; }
.modal-box h3{ font-size:23px; letter-spacing:-.4px; }
.modal-box input{ background:#fbfdfd; color:var(--ink); }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field-row .field{ min-width:0; }

@media(max-width:1100px){
    .main{ width:calc(100% - 220px); padding:36px 28px 60px; }
    .account-panels{ grid-template-columns:1fr; }
}

@media(max-width:900px){
    .main{ width:100%; max-width:none; padding:28px clamp(18px,4vw,40px) 52px; }
}

@media(max-width:600px){
    .account-heading{ align-items:flex-start; flex-direction:column; margin-bottom:20px; }
    .account-heading h1{ font-size:32px; }
    .account-shop-link{ align-self:flex-start; }
    .banner{ height:120px; }
    .profile-section{ padding:0 20px 24px; gap:12px; }
    .info h2{ font-size:21px; }
    .member-badge{ display:flex; margin-bottom:2px; }
    .stats{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .stats .card:last-child{ grid-column:1/-1; }
    .card{ min-width:0; min-height:110px; padding:16px; }
    .card > i{ margin-bottom:12px; }
    .account-panel{ padding:19px; }
    .field-row{ grid-template-columns:1fr; gap:0; }
}
