/* Professional page styling + fallback utilities for auth/profile/order pages */
:root {
    --yn-bg: #f5f7fb;
    --yn-surface: #ffffff;
    --yn-text: #101828;
    --yn-muted: #667085;
    --yn-border: #e4e7ec;
    --yn-primary: #111827;
    --yn-primary-hover: #1f2937;
    --yn-radius: 14px;
    --yn-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.main-wrapper,
.my-account,
section {
    color: var(--yn-text);
}

.yn-auth-section {
    background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 100%);
}

.yn-auth-wrap {
    max-width: 560px;
    margin: 0 auto;
}

.yn-auth-card,
.yn-account-card,
.yn-order-shell {
    border: 1px solid #e9edf3;
    border-radius: 16px;
    background: var(--yn-surface);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.yn-auth-form {
    padding: 1.2rem;
}

.yn-auth-head {
    margin-bottom: 18px;
}

.yn-auth-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.yn-auth-sub {
    margin: 8px 0 0;
    color: var(--yn-muted);
    font-size: 14px;
}

.yn-auth-label {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    display: inline-block;
}

.yn-auth-link {
    color: #475467;
    font-size: 13px;
    text-decoration: none;
}

.yn-auth-link:hover {
    text-decoration: underline;
}

.theme-input,
.form-control {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: var(--yn-text);
    padding: 10px 12px;
    font-size: 14px;
}

.theme-input:focus,
.form-control:focus {
    outline: 0;
    border-color: #98a2b3;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.1);
}

.input-field {
    margin-bottom: 12px;
}

.check-password {
    position: relative;
}

.check-password .eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #667085;
    cursor: pointer;
}

.check-password .theme-input {
    padding-right: 42px;
}

.yn-auth-cta,
.btn {
    border-radius: 10px;
    min-height: 44px;
    font-weight: 700;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--yn-primary-hover);
    border-color: var(--yn-primary-hover);
}

.btn-outline-dark {
    background: transparent;
    border-color: #1f2937;
    color: #1f2937;
}

.btn-outline-dark:hover {
    background: #1f2937;
    color: #fff;
}

.btn-sm {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.yn-form-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.yn-form-sub {
    font-size: 13px;
    color: var(--yn-muted);
    margin-bottom: 18px;
}

.yn-edit-form .label-input-field {
    margin-bottom: 12px;
}

.yn-edit-form .label-input-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.yn-edit-form .form-control {
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    background: #fff;
}

.yn-edit-form .form-control:focus {
    border-color: #98a2b3;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.1);
}

/* Profile dashboard */
.my-account {
    background: linear-gradient(180deg, #f6f8fc 0%, #ffffff 100%);
}

.account-nav {
    padding: 1.25rem !important;
}

.account-nav h6 {
    margin: 0 0 14px !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 800;
    color: #344054;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.account-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.account-nav-menu li {
    margin: 0 0 8px;
}

.account-nav-menu li:last-child {
    margin-bottom: 0;
}

.account-nav-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-decoration: none;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.account-nav-menu a:hover {
    background: #f8fafc;
    border-color: #e4e7ec;
    color: #111827;
}

.account-nav-menu a.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.25);
}

.account-nav-menu a span {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(17, 24, 39, 0.08);
    flex-shrink: 0;
}

.account-nav-menu a.active span {
    background: rgba(255, 255, 255, 0.18);
}

.account-nav-menu a svg {
    width: 15px;
    height: 15px;
    display: block;
}

.account-nav-menu a svg path {
    fill: currentColor !important;
}

.account-info {
    border: 1px solid #e9edf3;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.yn-profile-hero {
    display: grid;
    grid-template-columns: 84px 1fr 180px;
    gap: 16px;
    align-items: center;
    background: #fff;
    padding: 18px;
    margin-bottom: 16px;
}

.yn-profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #111827, #374151);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    border: 4px solid #f3f4f6;
}

.yn-profile-main {
    min-width: 0;
}

.yn-profile-head h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}

.yn-profile-head p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #667085;
}

.yn-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.yn-profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    color: #475467;
    font-size: 13px;
    max-width: 100%;
}

.yn-profile-meta span i {
    width: 16px;
    text-align: center;
    color: #111827;
}

.yn-profile-stat {
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #f8fafc;
    padding: 14px 12px;
    text-align: center;
}

.yn-profile-stat small {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.yn-profile-stat strong {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.yn-order-table thead th {
    border-top: 0;
    font-size: 12px;
    color: #475467;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}

.yn-order-table td {
    vertical-align: top;
    font-size: 14px;
    color: #344054;
}

.yn-order-total {
    font-weight: 700;
    color: #111827;
}

.view-invoice {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    color: #111827;
    text-decoration: none;
    background: #fff;
    transition: all .2s ease;
}

.view-invoice:hover {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.yn-order-meta {
    border: 1px solid #eceff4;
    border-radius: 12px;
    padding: 12px;
    background: #fafbfc;
    margin-bottom: 12px;
    font-size: 13px;
}

.yn-order-meta strong {
    display: block;
    color: #475467;
    font-size: 12px;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.yn-order-meta span {
    color: #101828;
    font-weight: 700;
    word-break: break-word;
}

.yn-order-card,
.yn-order-item-card {
    border: 1px solid #e9edf3;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
}

.yn-order-card h6 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.yn-order-card p,
.yn-order-item-card p {
    margin-bottom: 6px;
    font-size: 13px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px;
    border-top: 1px solid #eaecf0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.text-right {
    text-align: right;
}

.text-secondary {
    color: #475467;
}

.text-muted {
    color: #667085;
}

.bg-white {
    background: #fff;
}

.rounded {
    border-radius: 12px;
}

.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.w-100 {
    width: 100%;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: .5rem;
}

.gap-3 {
    gap: .75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.me-2 {
    margin-right: .5rem;
}

.fs-xs {
    font-size: 12px;
}

.yn-policy-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.yn-policy-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #111827;
}

.yn-policy-check label {
    margin: 0;
    color: #475467;
    font-size: 13px;
    line-height: 1.4;
}

/* Spacing helpers (fallback when Bootstrap styles are missing) */
.p-0 { padding: 0; }
.p-3 { padding: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.py-7 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-6 { padding-top: 3.5rem; }
.pt-20 { padding-top: 5rem; }
.pb-5 { padding-bottom: 3rem; }
.pb-120 { padding-bottom: 120px; }

.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }

/* Basic layout fallback */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.row > [class*="col-"] {
    padding: 0 12px;
}

.col-12,
.col-sm-12,
.col-sm-3,
.col-sm-5,
.col-sm-6,
.col-lg-6,
.col-xl-3,
.col-xl-9 {
    width: 100%;
}

.g-3 > [class*="col-"] {
    margin-bottom: 12px;
}

.g-4 > [class*="col-"] {
    margin-bottom: 16px;
}

@media (min-width: 576px) {
    .col-sm-3 { width: 25%; }
    .col-sm-5 { width: 41.6667%; }
    .col-sm-6 { width: 50%; }
    .col-sm-12 { width: 100%; }
    .p-sm-6 { padding: 4rem !important; }
}

@media (min-width: 992px) {
    .col-lg-6 { width: 50%; }
    .p-lg-5 { padding: 3rem !important; }
    .p-lg-6 { padding: 4rem !important; }
    .flex-lg-nowrap { flex-wrap: nowrap; }
}

@media (min-width: 1200px) {
    .col-xl-3 { width: 25%; }
    .col-xl-9 { width: 75%; }
}

@media (min-width: 768px) {
    .p-md-5 { padding: 3rem !important; }
    .p-md-6 { padding: 4rem !important; }
    .gap-md-4 { gap: 1rem !important; }
}

@media (max-width: 767.98px) {
    .yn-auth-title {
        font-size: 24px;
    }

    .yn-auth-card,
    .yn-account-card,
    .yn-order-shell {
        border-radius: 12px;
    }

    .yn-auth-form {
        padding: 1rem;
    }

    .account-nav {
        padding: 1rem !important;
    }

    .account-nav-menu a {
        font-size: 13px;
        padding: 9px 10px;
    }

    .yn-profile-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 12px;
    }

    .yn-profile-main {
        width: 100%;
    }

    .yn-profile-head h4 {
        font-size: 21px;
    }

    .yn-profile-meta {
        width: 100%;
        justify-content: center;
    }

    .yn-profile-meta span {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
        text-align: left;
    }

    .yn-profile-stat {
        width: 100%;
    }

    .yn-desktop-orders,
    .yn-order-desktop-table {
        display: none;
    }
}

@media (min-width: 768px) {
    .yn-mobile-orders,
    .yn-order-mobile-items {
        display: none;
    }
}
