/*
 * Cosmo Classes — user auth (login / register) + account dashboard.
 * Builds on the tokens defined in cosmo.css (--cosmo-gold, --cosmo-navy …).
 */

/* ===================== SHARED FORM BITS ===================== */
.cc-field { margin-bottom: 16px; }

.cc-field > label {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: 7px;
    color: var(--cosmo-ink);
}

.cc-input {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--cosmo-line);
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.cc-input:focus-within {
    border-color: var(--cosmo-gold);
    box-shadow: 0 0 0 3px rgba(194, 161, 77, .15);
}

.cc-input.is-invalid { border-color: #dc2626; }

.cc-input > i {
    padding-left: 13px;
    color: var(--cosmo-muted);
    font-size: 1.1rem;
}

.cc-input__prefix {
    padding: 0 4px 0 13px;
    color: var(--cosmo-muted);
    font-weight: 600;
    font-size: .92rem;
}

.cc-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    height: 46px;
    padding: 0 13px 0 10px;
    font-size: .95rem;
    color: var(--cosmo-ink);
}

.cc-input input:focus { outline: none; }

.cc-input__eye {
    border: 0;
    background: none;
    padding: 0 13px;
    color: var(--cosmo-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.cc-input__eye:hover { color: var(--cosmo-gold-dark); }

.cc-error {
    color: #dc2626;
    font-size: .82rem;
    margin-top: 6px;
}

.cc-check,
.cc-field > label.cc-check {
    display: flex;
    margin-bottom: 0;
    align-items: flex-start;
    gap: 8px;
    font-size: .88rem;
    color: var(--cosmo-muted);
    font-weight: 500;
    cursor: pointer;
}

.cc-check input {
    flex: none;
    width: 16px;
    height: 16px !important;
    margin: 2px 0 0;
    accent-color: var(--cosmo-gold);
}

.cc-check a,
.cc-row a {
    color: var(--cosmo-gold-dark);
    font-weight: 600;
    text-decoration: none;
}

.cc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 22px;
    font-size: .88rem;
}

.cc-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 14px;
}

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: .95rem;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, transform .15s, box-shadow .15s;
}

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

.cc-btn--primary {
    background: var(--cosmo-gold);
    color: #fff;
    box-shadow: 0 6px 16px rgba(194, 161, 77, .3);
}

.cc-btn--primary:hover { background: var(--cosmo-gold-dark); color: #fff; }

.cc-btn--navy { background: var(--cosmo-navy); color: #fff; }
.cc-btn--navy:hover { background: var(--cosmo-navy-2); color: #fff; }

.cc-btn--light { background: #fff; color: var(--cosmo-navy); }
.cc-btn--light:hover { color: var(--cosmo-gold-dark); }

.cc-btn--block { width: 100%; }

.cc-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 18px;
}

.cc-alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ===================== AUTH (LOGIN / REGISTER) ===================== */
.cc-auth {
    background:
        radial-gradient(circle at 10% 10%, rgba(194, 161, 77, .12), transparent 40%),
        var(--cosmo-bg-soft);
    padding: 48px 16px;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
}

.cc-auth__box {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(20, 33, 61, .12);
}

.cc-auth__brand {
    position: relative;
    background: linear-gradient(150deg, var(--cosmo-navy) 0%, var(--cosmo-navy-2) 100%);
    color: #fff;
    padding: 44px 38px;
    overflow: hidden;
}

/* Decorative gold rings */
.cc-auth__brand::before,
.cc-auth__brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(194, 161, 77, .25);
}

.cc-auth__brand::before { width: 280px; height: 280px; right: -110px; bottom: -110px; }
.cc-auth__brand::after  { width: 160px; height: 160px; right: -40px; bottom: -40px; }

.cc-auth__brand-inner { position: relative; z-index: 1; }

.cc-auth__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    text-decoration: none;
    margin-bottom: 40px;
}

.cc-auth__logo:hover { color: var(--cosmo-gold); }

.cc-auth__logo img {
    height: 42px;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
}

.cc-auth__brand h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.cc-auth__brand p {
    color: rgba(255, 255, 255, .72);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 30px;
}

.cc-auth__points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.cc-auth__points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .92rem;
    color: rgba(255, 255, 255, .9);
}

.cc-auth__points i {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(194, 161, 77, .18);
    color: var(--cosmo-gold);
    font-size: 1.05rem;
}

.cc-auth__form { padding: 44px 46px; }

.cc-auth__form h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--cosmo-navy);
    margin: 0 0 6px;
}

.cc-auth__lead {
    color: var(--cosmo-muted);
    font-size: .93rem;
    margin: 0 0 26px;
}

.cc-auth__switch {
    text-align: center;
    margin: 22px 0 0;
    font-size: .92rem;
    color: var(--cosmo-muted);
}

.cc-auth__switch a {
    color: var(--cosmo-gold-dark);
    font-weight: 700;
    text-decoration: none;
}

/* ===================== ACCOUNT LAYOUT ===================== */
.cc-account {
    background: var(--cosmo-bg-soft);
    padding: 32px 16px 56px;
    min-height: calc(100vh - 70px);
}

.cc-account__wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.cc-side {
    position: sticky;
    top: 90px;
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 16px;
    padding: 18px;
}

.cc-side__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--cosmo-line);
    min-width: 0;
}

.cc-side__user > div { min-width: 0; }

.cc-side__user strong,
.cc-side__user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-side__user strong { color: var(--cosmo-navy); font-size: .98rem; }
.cc-side__user small { color: var(--cosmo-muted); font-size: .8rem; }

.cc-avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--cosmo-gold);
    color: #fff;
    font-weight: 800;
}

.cc-avatar--lg { width: 48px; height: 48px; font-size: 1.2rem; }

.cc-side__nav { display: grid; gap: 4px; }

.cc-side__nav a,
.cc-side__nav button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: none;
    border-radius: 10px;
    color: var(--cosmo-ink);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.cc-side__nav i { font-size: 1.15rem; color: var(--cosmo-muted); }

.cc-side__nav a:hover,
.cc-side__nav button:hover { background: var(--cosmo-bg-soft); color: var(--cosmo-gold-dark); }

.cc-side__nav a.is-active {
    background: rgba(194, 161, 77, .12);
    color: var(--cosmo-gold-dark);
}

.cc-side__nav a.is-active i,
.cc-side__nav a:hover i { color: var(--cosmo-gold-dark); }

.cc-side__nav form {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--cosmo-line);
}

.cc-side__nav button { color: #dc2626; }
.cc-side__nav button i { color: #dc2626; }
.cc-side__nav button:hover { background: #fef2f2; color: #b91c1c; }

.cc-main { min-width: 0; }

/* ===================== DASHBOARD ===================== */
.cc-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 20%, rgba(194, 161, 77, .35), transparent 45%),
        linear-gradient(135deg, var(--cosmo-navy), var(--cosmo-navy-2));
    margin-bottom: 22px;
}

.cc-hero__eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cosmo-gold);
    margin-bottom: 6px;
}

.cc-hero h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; color: #fff; }
.cc-hero p { margin: 0; color: rgba(255, 255, 255, .75); font-size: .95rem; }

.cc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.cc-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 14px;
    padding: 18px;
}

.cc-stat > div { flex: 1; min-width: 0; }
.cc-stat strong { display: block; font-size: 1.45rem; font-weight: 800; color: var(--cosmo-navy); line-height: 1.1; }
.cc-stat small { color: var(--cosmo-muted); font-size: .82rem; font-weight: 500; }

.cc-stat__icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.cc-stat__icon--gold  { background: rgba(194, 161, 77, .15); color: var(--cosmo-gold-dark); }
.cc-stat__icon--navy  { background: rgba(20, 33, 61, .08); color: var(--cosmo-navy); }
.cc-stat__icon--green { background: #ecfdf5; color: #059669; }
.cc-stat__icon--blue  { background: #eff6ff; color: #2563eb; }

.cc-progress {
    display: block;
    height: 5px;
    margin-top: 6px;
    border-radius: 99px;
    background: var(--cosmo-line);
    overflow: hidden;
}

.cc-progress span { display: block; height: 100%; background: #2563eb; border-radius: inherit; }

.cc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 22px;
}

.cc-panel {
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 16px;
    overflow: hidden;
    min-width: 0;
}

.cc-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cosmo-line);
}

.cc-panel__head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cosmo-navy);
    margin: 0;
}

.cc-panel__head h2 i { color: var(--cosmo-gold-dark); }

.cc-panel__head a {
    font-size: .85rem;
    font-weight: 600;
    color: var(--cosmo-gold-dark);
    text-decoration: none;
}

.cc-panel__body { padding: 20px; }

.cc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--cosmo-line);
    text-decoration: none;
    transition: background .15s;
}

.cc-item:last-child { border-bottom: 0; }
.cc-item:hover { background: var(--cosmo-bg-soft); }

.cc-item__body { flex: 1; min-width: 0; }

.cc-item__body strong {
    display: block;
    color: var(--cosmo-ink);
    font-size: .92rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-item__body small { color: var(--cosmo-muted); font-size: .8rem; }
.cc-item:hover .cc-item__body strong { color: var(--cosmo-gold-dark); }

.cc-item__arrow { color: var(--cosmo-muted); font-size: 1.2rem; }

.cc-item__dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cosmo-gold);
    box-shadow: 0 0 0 4px rgba(194, 161, 77, .15);
}

.cc-date {
    flex: none;
    width: 48px;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--cosmo-line);
}

.cc-date b { display: block; font-size: 1.1rem; color: var(--cosmo-navy); padding: 4px 0 0; }

.cc-date small {
    display: block;
    background: var(--cosmo-gold);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 0;
}

.cc-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    color: var(--cosmo-muted);
    font-size: .9rem;
}

.cc-quick {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.cc-quick a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 14px;
    color: var(--cosmo-ink);
    font-weight: 600;
    font-size: .88rem;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

.cc-quick a i { font-size: 1.6rem; color: var(--cosmo-gold-dark); }

.cc-quick a:hover {
    border-color: var(--cosmo-gold);
    transform: translateY(-2px);
    box-shadow: var(--cosmo-shadow);
    color: var(--cosmo-gold-dark);
}

.cc-page-head { margin-bottom: 20px; }
.cc-page-head h1 { font-size: 1.5rem; font-weight: 800; color: var(--cosmo-navy); margin: 0 0 4px; }
.cc-page-head p { color: var(--cosmo-muted); margin: 0; font-size: .93rem; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
    .cc-stats { grid-template-columns: repeat(2, 1fr); }
    .cc-quick { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .cc-auth__box { grid-template-columns: 1fr; max-width: 520px; }
    .cc-auth__brand { padding: 28px; }
    .cc-auth__logo { margin-bottom: 18px; }
    .cc-auth__brand h2 { font-size: 1.4rem; }
    .cc-auth__brand p { margin-bottom: 0; }
    .cc-auth__points { display: none; }

    .cc-account__wrap { grid-template-columns: minmax(0, 1fr); }
    .cc-account__wrap > * { min-width: 0; }
    .cc-side { position: static; }
    .cc-side__nav { grid-template-columns: repeat(2, 1fr); }
    .cc-side__nav form { grid-column: 1 / -1; }

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

@media (max-width: 560px) {
    .cc-auth { padding: 20px 12px; }
    .cc-auth__form { padding: 28px 22px; }
    .cc-grid-2 { grid-template-columns: 1fr; }
    .cc-row { flex-wrap: wrap; }

    .cc-hero { flex-direction: column; align-items: flex-start; padding: 22px; }
    .cc-hero h1 { font-size: 1.3rem; }
    .cc-stats { gap: 10px; }
    .cc-stat { padding: 14px; gap: 10px; }
    .cc-stat__icon { width: 38px; height: 38px; font-size: 1.1rem; }
    .cc-stat strong { font-size: 1.2rem; }
    .cc-quick { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== PDF STORE ===================== */
.cc-btn--sm { padding: 9px 14px; font-size: .86rem; border-radius: 9px; }

.cc-btn--outline {
    background: #fff;
    color: var(--cosmo-navy);
    border: 1.5px solid var(--cosmo-line);
}

.cc-btn--outline:hover { border-color: var(--cosmo-gold); color: var(--cosmo-gold-dark); }

.cc-btn--success { background: #059669; color: #fff; }
.cc-btn--success:hover { background: #047857; color: #fff; }

.cc-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.cc-pill--pending   { background: #fef3c7; color: #92400e; }
.cc-pill--contacted { background: #e0f2fe; color: #075985; }
.cc-pill--active    { background: #d1fae5; color: #065f46; }
.cc-pill--cancelled { background: #f3f4f6; color: #6b7280; }

.cc-store-hero {
    background:
        radial-gradient(circle at 85% 30%, rgba(194, 161, 77, .3), transparent 45%),
        linear-gradient(135deg, var(--cosmo-navy), var(--cosmo-navy-2));
    color: #fff;
    padding: 48px 16px;
}

.cc-store-hero__inner { max-width: 1200px; margin: 0 auto; }
.cc-store-hero h1 { color: #fff; font-size: 2rem; font-weight: 800; margin: 0 0 8px; }
.cc-store-hero p { color: rgba(255, 255, 255, .78); max-width: 640px; margin: 0; line-height: 1.6; }

.cc-store {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px 56px;
}

.cc-pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
}

.cc-pdf-grid--compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.cc-pdf {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}

.cc-pdf:hover { box-shadow: var(--cosmo-shadow); transform: translateY(-2px); }

.cc-pdf__cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--cosmo-bg-soft);
    overflow: hidden;
}

.cc-pdf__cover img { width: 100%; height: 100%; object-fit: cover; }

.cc-pdf__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--cosmo-gold-dark);
    background: linear-gradient(135deg, #fbf7ec, #f3ead2);
}

.cc-pdf__placeholder i { font-size: 3rem; }
.cc-pdf__placeholder b { letter-spacing: .2em; font-size: .8rem; }

.cc-pdf__off {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 6px;
}

.cc-pdf__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.cc-pdf__body h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0; }
.cc-pdf__body h3 a { color: var(--cosmo-navy); text-decoration: none; }
.cc-pdf__body h3 a:hover { color: var(--cosmo-gold-dark); }

.cc-pdf__meta { color: var(--cosmo-muted); font-size: .82rem; display: flex; align-items: center; gap: 4px; }

.cc-pdf__price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.cc-pdf__price strong { font-size: 1.25rem; font-weight: 800; color: var(--cosmo-navy); }
.cc-pdf__price del { color: var(--cosmo-muted); font-size: .9rem; }
.cc-pdf__price--lg strong { font-size: 1.8rem; }

.cc-pdf__save {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
    font-size: .8rem;
    padding: 3px 8px;
    border-radius: 6px;
}

.cc-pdf__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cc-pdf__actions form { margin: 0; }

.cc-pdf .cc-pdf__actions > *,
.cc-pdf .cc-pdf__actions form .cc-btn { flex: 1; width: 100%; padding-left: 8px; padding-right: 8px; }

.cc-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.cc-steps > div {
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 14px;
    padding: 18px;
}

.cc-steps span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cosmo-gold);
    color: #fff;
    font-weight: 800;
    margin-bottom: 10px;
}

.cc-steps strong { display: block; color: var(--cosmo-navy); }
.cc-steps small { color: var(--cosmo-muted); }

.cc-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--cosmo-muted);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    margin-bottom: 18px;
}

.cc-back:hover { color: var(--cosmo-gold-dark); }

.cc-pdf-detail {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 36px;
    background: #fff;
    border: 1px solid var(--cosmo-line);
    border-radius: 18px;
    padding: 28px;
}

.cc-pdf-detail__cover {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--cosmo-bg-soft);
}

.cc-pdf-detail__cover img { width: 100%; height: 100%; object-fit: cover; }

.cc-pdf-detail__info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cc-pdf-detail__info h1 { font-size: 1.7rem; font-weight: 800; color: var(--cosmo-navy); margin: 0; }
.cc-pdf-detail__info .cc-pdf__price { margin-top: 0; }

.cc-pdf-detail__desc {
    border-top: 1px solid var(--cosmo-line);
    padding-top: 16px;
    color: var(--cosmo-ink);
    line-height: 1.7;
    font-size: .95rem;
}

.cc-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: var(--cosmo-bg-soft);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0;
    color: var(--cosmo-muted);
    font-size: .88rem;
}

.cc-note i { color: var(--cosmo-gold-dark); font-size: 1.1rem; }

/* Orders tab */
.cc-mb { margin-bottom: 26px; }
.cc-muted { color: var(--cosmo-muted); font-size: .82rem; }

.cc-order {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--cosmo-line);
}

.cc-order:last-child { border-bottom: 0; }
.cc-order__main { flex: 1; min-width: 0; }
.cc-order__main strong { display: block; color: var(--cosmo-ink); font-size: .95rem; }
.cc-order__main small { color: var(--cosmo-muted); font-size: .8rem; }
.cc-order__action { min-width: 150px; text-align: right; }

.cc-panel__head--bare { border: 0; padding: 0 2px 14px; }

@media (max-width: 900px) {
    .cc-pdf-detail { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .cc-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .cc-store-hero h1 { font-size: 1.5rem; }
    .cc-steps { grid-template-columns: 1fr; }
    .cc-order { flex-wrap: wrap; }
    .cc-order__action { min-width: 0; width: 100%; text-align: left; }
}

.cc-alert--info {
    background: #fbf7ec;
    color: #7a5f1f;
    border: 1px solid #ecdcae;
}

/* ===================== MOBILE POLISH ===================== */
@media (max-width: 900px) {
    /* Sidebar becomes a compact, swipeable tab bar */
    .cc-account { padding-top: 16px; }
    .cc-account__wrap { gap: 16px; }

    .cc-side {
        padding: 6px;
        border-radius: 12px;
    }

    .cc-side__user { display: none; }

    .cc-side__nav {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .cc-side__nav::-webkit-scrollbar { display: none; }

    .cc-side__nav a,
    .cc-side__nav button {
        flex: none;
        width: auto;
        padding: 9px 14px;
        font-size: .88rem;
        white-space: nowrap;
    }

    .cc-side__nav form {
        flex: none;
        margin: 0 0 0 auto;
        padding: 0 0 0 4px;
        border-top: 0;
        border-left: 1px solid var(--cosmo-line);
    }

    /* Detail page */
    .cc-pdf-detail__cover { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
    .cc-account { padding: 12px 12px 40px; }

    .cc-hero { margin-bottom: 16px; }
    .cc-hero .cc-btn { width: 100%; }

    /* Stats: icon above the number so labels don't wrap awkwardly */
    .cc-stats { margin-bottom: 16px; }
    .cc-stat { flex-direction: column; align-items: flex-start; gap: 8px; }
    .cc-stat small { display: block; line-height: 1.3; }

    .cc-panel__head { padding: 14px 16px; }
    .cc-panel__body { padding: 16px; }
    .cc-order { padding: 14px 16px; gap: 8px 10px; }
    .cc-order__main { flex-basis: calc(100% - 130px); }
    .cc-order__action:empty { display: none; }
    .cc-order__action .cc-btn { width: 100%; }

    /* PDF cards: horizontal layout — small cover left, details right */
    .cc-store { padding: 20px 12px 40px; }
    .cc-store-hero { padding: 28px 16px; }
    .cc-pdf-grid,
    .cc-pdf-grid--compact { grid-template-columns: 1fr; gap: 14px; }

    .cc-pdf {
        display: grid;
        grid-template-columns: 104px 1fr;
    }

    .cc-pdf__cover { aspect-ratio: auto; height: 100%; min-height: 130px; }
    .cc-pdf__placeholder i { font-size: 2rem; }
    .cc-pdf__placeholder b { font-size: .7rem; }
    .cc-pdf__off { top: 8px; left: 8px; font-size: .68rem; padding: 3px 6px; }

    .cc-pdf__body { padding: 12px; gap: 6px; }
    .cc-pdf__body h3 { font-size: .93rem; }
    .cc-pdf__price strong { font-size: 1.1rem; }
    .cc-pdf__actions { gap: 6px; }
    .cc-pdf .cc-btn--sm { padding: 8px 6px; font-size: .8rem; }
    .cc-pdf .cc-pill { white-space: normal; font-size: .74rem; }

    /* Detail page: full-width buttons */
    .cc-pdf-detail { padding: 14px; border-radius: 14px; }
    .cc-pdf-detail__info h1 { font-size: 1.35rem; }
    .cc-pdf__price--lg strong { font-size: 1.5rem; }
    .cc-pdf-detail .cc-pdf__actions > *,
    .cc-pdf-detail .cc-pdf__actions form .cc-btn { flex: 1; width: 100%; }

    .cc-steps { gap: 10px; margin-top: 28px; }
    .cc-steps > div { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; padding: 14px; }
    .cc-steps span { grid-row: span 2; margin: 0; }

    /* Auth pages */
    .cc-auth__brand { padding: 22px; }
    .cc-auth__brand p { display: none; }
    .cc-auth__brand h2 { margin: 0; font-size: 1.25rem; }
    .cc-auth__logo { margin-bottom: 12px; }
    .cc-auth__form h1 { font-size: 1.4rem; }
}

@media (max-width: 560px) {
    /* All account tabs (incl. Logout) visible at once: icon over label */
    .cc-side__nav {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        overflow: visible;
    }

    .cc-side__nav a,
    .cc-side__nav button {
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 8px 4px;
        font-size: .74rem;
        text-align: center;
    }

    .cc-side__nav i { font-size: 1.25rem; }

    .cc-side__nav form {
        grid-column: auto;
        margin: 0;
        padding: 0;
        border-left: 0;
    }

    .cc-side__nav form button { height: 100%; }
}

/* ===================== ERROR ALERT + CHECKOUT ===================== */
.cc-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.cc-pay {
    max-width: 520px;
}

.cc-pay__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ebf0;
}

.cc-pay__item strong,
.cc-pay__item small {
    display: block;
}

.cc-pay__item small {
    color: #6b7280;
    margin-top: 4px;
}

.cc-pay__cover {
    flex: 0 0 64px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f8fb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-pay__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-pay__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-size: .95rem;
}

.cc-pay__total strong {
    font-size: 1.5rem;
    color: #14213d;
}

.cc-pay .cc-note {
    margin-top: 12px;
}
