/* ════════════════════════════════
   Clothing Membership – Auth CSS
   ════════════════════════════════ */

/* ── Auth Wrap (Login/Register) ── */
.cm-auth-wrap {
    max-width: 480px;
    margin: 0 auto;
    font-family: inherit;
}

.cm-auth-notice {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: .93rem;
    font-weight: 500;
}
.cm-auth-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.cm-auth-success { background: #d1fae5; color: #065f46; border-left: 4px solid #059669; }

/* Tabs */
.cm-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}
.cm-auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.cm-auth-tab.active,
.cm-auth-tab:hover { color: #7c3aed; border-bottom-color: #7c3aed; }

/* Panels */
.cm-auth-panel { display: none; }
.cm-auth-panel.active { display: block; }

.cm-panel-title { font-size: 1.15rem; margin: 0 0 6px; color: #111; }
.cm-panel-desc  { color: #6b7280; font-size: .9rem; margin: 0 0 18px; }

/* Fields */
.cm-field { margin-bottom: 16px; }
.cm-field label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}
.cm-field label span { color: #dc2626; }
.cm-field input[type="text"],
.cm-field input[type="email"],
.cm-field input[type="password"],
.cm-field input[type="tel"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    color: #111;
    box-sizing: border-box;
}
.cm-field input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.cm-field input.cm-disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.cm-field small { display: block; margin-top: 4px; color: #9ca3af; font-size: .8rem; }

.cm-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cm-field-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) { .cm-field-row-2 { grid-template-columns: 1fr; } }

.cm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    color: #374151;
    cursor: pointer;
}
.cm-forgot-link { font-size: .85rem; color: #7c3aed; text-decoration: none; }
.cm-forgot-link:hover { text-decoration: underline; }

/* Password toggle */
.cm-password-wrap { position: relative; }
.cm-password-wrap input { padding-right: 44px; }
.cm-toggle-pwd {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    opacity: .6;
    transition: opacity .2s;
}
.cm-toggle-pwd:hover { opacity: 1; }

.cm-pwd-match-msg { font-size: .8rem; display: block; margin-top: 4px; min-height: 16px; }
.cm-pwd-ok  { color: #059669; }
.cm-pwd-err { color: #dc2626; }

/* Auth Button */
.cm-auth-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    margin-top: 6px;
    text-align: center;
}
.cm-auth-btn:hover { opacity: .88; transform: translateY(-1px); }

.cm-auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: .88rem;
    color: #6b7280;
}
.cm-auth-switch a { color: #7c3aed; font-weight: 600; text-decoration: none; }
.cm-auth-switch a:hover { text-decoration: underline; }

.cm-auth-info { color: #374151; }

/* ── Account Dashboard ── */
.cm-account-wrap { max-width: 900px; margin: 0 auto; }

.cm-account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 680px) {
    .cm-account-layout { grid-template-columns: 1fr; }
}

/* Sidebar */
.cm-account-nav {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.cm-account-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff;
}
.cm-avatar-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800;
    flex-shrink: 0;
}
.cm-account-avatar strong { display: block; font-size: .88rem; line-height: 1.3; }
.cm-account-avatar span   { font-size: .75rem; opacity: .85; word-break: break-all; }

.cm-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px;
    text-decoration: none;
    font-size: .9rem;
    color: #374151;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.cm-nav-item:hover  { background: #f5f3ff; color: #7c3aed; }
.cm-nav-item.active { background: #f5f3ff; color: #7c3aed; border-left-color: #7c3aed; font-weight: 600; }
.cm-nav-logout      { color: #dc2626 !important; }
.cm-nav-logout:hover{ background: #fee2e2 !important; }

/* Content area */
.cm-account-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    min-height: 300px;
}

.cm-acc-title { margin: 0 0 22px; font-size: 1.2rem; color: #111; }

/* Dashboard cards */
.cm-dash-cards { display: flex; flex-direction: column; gap: 14px; }
.cm-dash-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.cm-card-green  { background: #f0fdf4; border-color: #bbf7d0; }
.cm-card-yellow { background: #fefce8; border-color: #fde68a; }
.cm-card-purple { background: #f5f3ff; border-color: #ddd6fe; }
.cm-card-blue   { background: #eff6ff; border-color: #bfdbfe; }

.cm-dash-card-icon { font-size: 1.6rem; flex-shrink: 0; }
.cm-dash-card strong { display: block; font-size: .95rem; margin-bottom: 3px; color: #111; }
.cm-dash-card span   { font-size: .85rem; color: #555; }
.cm-dash-card a      { color: #7c3aed; font-weight: 600; text-decoration: none; }

/* Membership status */
.cm-membership-status-box {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.cm-ms-active   { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cm-ms-inactive { background: #fef9c3; border: 1px solid #fde68a; }

.cm-ms-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cm-ms-badge  { background: #d1fae5; color: #065f46; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.cm-ms-header strong { font-size: 1.05rem; color: #111; }

.cm-ms-details { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 18px; }
.cm-ms-details div { display: flex; flex-direction: column; }
.cm-ms-details label { font-size: .78rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.cm-ms-details span  { font-size: .93rem; color: #111; font-weight: 500; }

.cm-btn-renew {
    display: inline-block;
    padding: 10px 22px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .2s;
}
.cm-btn-renew:hover { opacity: .85; color: #fff; }

/* Orders table */
.cm-acc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cm-acc-table th { text-align: left; padding: 10px 12px; background: #f9fafb; border-bottom: 2px solid #e5e7eb; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.cm-acc-table td { padding: 11px 12px; border-bottom: 1px solid #f3f4f6; color: #374151; }
.cm-acc-table tr:last-child td { border-bottom: none; }
.cm-acc-table tr:hover td { background: #fafafa; }

.cm-acc-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.cm-acc-badge-active,
.cm-acc-badge-completed { background: #d1fae5; color: #065f46; }
.cm-acc-badge-expired,
.cm-acc-badge-cancelled,
.cm-acc-badge-failed    { background: #fee2e2; color: #991b1b; }
.cm-acc-badge-pending,
.cm-acc-badge-processing{ background: #fef3c7; color: #92400e; }
.cm-acc-badge-on-hold   { background: #e0f2fe; color: #0369a1; }

.cm-acc-link { color: #7c3aed; font-weight: 600; text-decoration: none; }
.cm-acc-link:hover { text-decoration: underline; }

.cm-empty-msg { color: #6b7280; font-style: italic; }

/* Profile form */
.cm-profile-form { max-width: 500px; }

/* Logout link */
.cm-logout-link { color: #dc2626; font-weight: 600; text-decoration: none; }
.cm-logout-link:hover { text-decoration: underline; }
