:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --line: #e2e8f0;
    --green: #16a34a;
    --orange: #f97316;
    --purple: #7c3aed;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    background: #ffffff;
    color: var(--dark);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--dark);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 900;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 15px;
    color: #334155;
}

.nav-links a {
    transition: .2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: #eff6ff;
}

.btn-dark {
    background: var(--dark);
    color: #fff;
}

.btn-dark:hover {
    background: #1e293b;
}

.btn-glass {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
    margin-left: 8px;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, .2);
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 15%, rgba(37, 99, 235, .16), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(124, 58, 237, .14), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 70%);
    padding: 90px 0 70px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 44px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
    margin: 0 0 22px;
    letter-spacing: -1.5px;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 19px;
    color: #475569;
    margin: 0 0 30px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hero-points {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #475569;
    font-size: 14px;
}

.hero-points span {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
}

.share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.share-label {
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.share-line {
    background: #06c755;
    color: #fff;
}

.share-line:hover {
    background: #05b34c;
    transform: translateY(-1px);
}

.share-fb {
    background: #1877f2;
    color: #fff;
}

.share-fb:hover {
    background: #166fe5;
    transform: translateY(-1px);
}

.share-copy {
    background: #fff;
    color: var(--dark);
    border-color: var(--line);
}

.share-copy:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.copy-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--dark);
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    z-index: 999;
    pointer-events: none;
}

.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mock {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .12);
    padding: 20px;
}

.mock-head {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mock-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 14px;
    background: #f8fafc;
}

.mock-card-last {
    margin-top: 14px;
    margin-bottom: 0;
}

.mock-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 800;
    margin-bottom: 10px;
}

.mock-desc {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.mock-note {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.status {
    font-size: 12px;
    color: #166534;
    background: #dcfce7;
    border-radius: 999px;
    padding: 4px 8px;
}

.bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}

.bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--purple));
}

.bar-72 {
    width: 72%;
}

.mock-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.meta-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    font-size: 13px;
    color: var(--gray);
}

.meta-box strong {
    display: block;
    color: var(--dark);
    font-size: 18px;
    line-height: 1.2;
}

section {
    padding: 72px 0;
}

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 42px;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
    margin: 0 0 14px;
    letter-spacing: -1px;
}

.section-head p {
    margin: 0;
    color: var(--gray);
    font-size: 17px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .04);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.blue {
    background: #dbeafe;
}

.green {
    background: #dcfce7;
}

.orange {
    background: #ffedd5;
}

.purple {
    background: #ede9fe;
}

.card h3 {
    font-size: 20px;
    margin: 0 0 8px;
}

.card p {
    color: var(--gray);
    margin: 0;
    font-size: 15px;
}

.flow {
    background: #f8fafc;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.step {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    min-height: 170px;
}

.step-no {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 14px;
}

.step h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.step p {
    margin: 0;
    color: var(--gray);
    font-size: 14px;
}

.pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.price-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background: #fff;
    position: relative;
}

.price-card.featured {
    border-color: #93c5fd;
    box-shadow: 0 24px 60px rgba(37, 99, 235, .13);
    transform: translateY(-8px);
}

.tag {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}

.price-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.price {
    font-size: 34px;
    font-weight: 900;
    margin: 10px 0;
    letter-spacing: -1px;
}

.price small {
    font-size: 15px;
    color: var(--gray);
    font-weight: 600;
}

.list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.list li {
    padding: 9px 0;
    border-top: 1px solid #f1f5f9;
    color: #475569;
    font-size: 15px;
}

.list li::before {
    content: "✓";
    color: var(--green);
    font-weight: 900;
    margin-right: 8px;
}

.pricing-note {
    text-align: center;
    color: #64748b;
    margin-top: 28px;
}

.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.role-card {
    border-radius: 26px;
    padding: 28px;
    color: #fff;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.role-card.company {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.role-card.designer {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.role-card.agency {
    background: linear-gradient(135deg, #f97316, #c2410c);
}

.role-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.role-card p {
    margin: 0;
    color: rgba(255, 255, 255, .86);
}

.role-btn {
    margin-top: 20px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}

.role-btn:hover {
    background: rgba(255, 255, 255, .24);
}

.cta {
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .16), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #fff;
    text-align: center;
    padding: 76px 0;
}

.cta h2 {
    font-size: clamp(30px, 4vw, 44px);
    margin: 0 0 14px;
    line-height: 1.2;
}

.cta p {
    color: rgba(255, 255, 255, .78);
    font-size: 18px;
    margin: 0 auto 28px;
    max-width: 720px;
}

.footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    color: var(--gray);
    font-size: 14px;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.login-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #166534;
    background: #dcfce7;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, box-shadow .2s;
}

a.login-info:hover {
    background: #bbf7d0;
    box-shadow: 0 2px 8px rgba(22, 101, 52, .15);
}

.login-info-arrow {
    font-size: 16px;
    opacity: .6;
    margin-left: 2px;
}

/* ── Auth pages (login / register / forgot / reset) ── */
.auth-wrap {
    min-height: calc(100vh - 73px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fb;
    padding: 40px 16px;
}

.auth-box {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    width: 100%;
    max-width: 480px;
}

.auth-box h1 {
    font-size: 24px;
    margin: 0 0 20px;
}

.auth-role-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.auth-box label {
    display: block;
    margin-top: 14px;
    font-weight: 600;
}

.auth-box input[type="text"],
.auth-box input[type="email"],
.auth-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}
.auth-box .pw-wrap { position: relative; }
.auth-box .pw-wrap input { padding-right: 2.8rem !important; margin-top: 6px; }
.auth-box .pw-wrap .pw-eye { top: calc(50% + 3px); }

.auth-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.auth-box button[type="submit"] {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
}

.auth-box button[type="submit"]:hover {
    background: var(--primary-dark);
}

.auth-box .error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
}

.auth-box .success {
    background: #dcfce7;
    color: #166534;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--gray);
}

.auth-links a {
    color: var(--primary);
    margin: 0 8px;
}

.auth-links a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .hero-grid,
    .cards,
    .pricing,
    .role-grid {
        grid-template-columns: 1fr;
    }

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

    .price-card.featured {
        transform: none;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 560px) {
    .nav {
        height: auto;
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-actions .btn,
    .nav-actions .login-info {
        flex: 1;
    }

    .hero {
        padding-top: 56px;
    }

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

    .mock-meta {
        grid-template-columns: 1fr;
    }

    .btn-glass {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ═══════════════════════════════════════════════
   Company Dashboard & Project Pages
   ═══════════════════════════════════════════════ */

.dash-wrap {
    background: #f8fafc;
    min-height: calc(100vh - 73px);
    padding: 36px 0 60px;
}

.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.dash-title {
    font-size: clamp(22px, 3vw, 30px);
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.dash-sub {
    margin: 0;
    color: var(--gray);
    font-size: 15px;
}

.page-back {
    margin-bottom: 20px;
    font-size: 14px;
}

.page-back a {
    color: var(--gray);
    transition: color .2s;
}

.page-back a:hover {
    color: var(--primary);
}

/* Stats */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 24px;
    text-align: center;
}

.stat-card.active-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}

.stat-num {
    font-size: 36px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-lbl {
    font-size: 13px;
    color: var(--gray);
    font-weight: 600;
}

/* Section */
.dash-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
}

.dash-section-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

.dash-section-head h2 {
    margin: 0;
    font-size: 18px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--gray);
}

.empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

.empty-state p {
    margin: 0 0 20px;
    font-size: 16px;
}

/* Project Table */
.project-table-wrap {
    overflow-x: auto;
}

.project-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.project-table th {
    padding: 12px 20px;
    text-align: left;
    color: var(--gray);
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
    background: #fafafa;
    white-space: nowrap;
}

.project-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.project-table tr:last-child td {
    border-bottom: none;
}

.project-table tr:hover td {
    background: #fafeff;
}

.td-name {
    font-weight: 700;
    color: var(--dark);
    max-width: 280px;
}

.td-date {
    color: var(--gray);
    white-space: nowrap;
}

.btn-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.btn-link:hover {
    text-decoration: underline;
}

.td-actions {
    display: flex;
    gap: 14px;
    white-space: nowrap;
}

.cover-current img {
    max-height: 140px;
    border-radius: 10px;
    border: 1px solid var(--line);
    margin-bottom: 8px;
    display: block;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.draft      { background: #f1f5f9; color: #475569; }
.status-badge.payment    { background: #fff7ed; color: #9a3412; }
.status-badge.waiting    { background: #fef3c7; color: #92400e; }
.status-badge.accepted   { background: #e0f2fe; color: #075985; }
.status-badge.active     { background: #dcfce7; color: #166534; }
.status-badge.reviewing  { background: #f3e8ff; color: #6b21a8; }
.status-badge.live       { background: #d1fae5; color: #065f46; }
.status-badge.done       { background: #dbeafe; color: #1d4ed8; }
.status-badge.cancelled  { background: #fee2e2; color: #991b1b; }

/* ── Project Form ── */
.form-alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}

.form-alert.error   { background: #fee2e2; color: #991b1b; }
.form-alert.success { background: #dcfce7; color: #166534; }

.pj-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
}

.form-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.form-card-head h2 {
    margin: 0;
    font-size: 19px;
}

.form-card-no {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 15px;
    flex-shrink: 0;
}

.field {
    margin-bottom: 22px;
}

.field:last-child {
    margin-bottom: 0;
}

.field > label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--dark);
}

.field > label em {
    color: #ef4444;
    font-style: normal;
    margin-left: 2px;
}

.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #dde1e7;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--dark);
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.field textarea {
    resize: vertical;
    min-height: 90px;
}

.field-hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--gray);
}

/* Upload */
.upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.upload-hint p { margin: 0; color: var(--gray); font-size: 14px; }
.upload-hint small { font-size: 12px; }

.upload-preview img {
    max-height: 180px;
    border-radius: 8px;
    margin-top: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Radio cards */
.radio-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.radio-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card:hover,
.radio-card.checked {
    border-color: var(--primary);
    background: #eff6ff;
}

.rc-ico   { font-size: 22px; }
.rc-title { font-weight: 700; font-size: 15px; }
.rc-desc  { font-size: 13px; color: var(--gray); }

/* Checkbox pills */
.checkbox-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: .2s;
}

.pill input[type="checkbox"] {
    display: none;
}

.pill:hover,
.pill.checked {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

/* Plan cards */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.plan-card {
    display: flex;
    flex-direction: column;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    cursor: pointer;
    transition: .2s;
    position: relative;
}

.plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.plan-card:hover,
.plan-card.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .1);
}

.plan-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 6px;
}

.plan-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 14px;
}

.plan-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-list li::before {
    content: "✓ ";
    color: var(--green);
    font-weight: 700;
}

/* Budget input */
.budget-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #dde1e7;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.budget-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.budget-prefix {
    padding: 11px 14px;
    background: #f8fafc;
    border-right: 1px solid #dde1e7;
    font-weight: 700;
    color: var(--gray);
    white-space: nowrap;
}

.budget-input-wrap input {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1;
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-bottom: 20px;
}

/* ── Project View ── */
.pj-view-head {
    margin-bottom: 24px;
}

.pj-view-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.pj-view-title-row h1 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
}

.pj-view-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--gray);
}

.pj-view-meta span + span::before {
    content: "·";
    margin-right: 18px;
}

.pj-view-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

.pj-view-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pj-cover img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.info-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 24px;
}

.info-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.info-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f1f5f9;
    font-size: 15px;
}

.info-row:first-of-type {
    border-top: none;
}

.info-key {
    color: var(--gray);
    font-weight: 600;
    font-size: 14px;
    padding-top: 1px;
}

.info-pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.p-tag {
    background: #eff6ff;
    color: var(--primary);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 700;
}

.pj-view-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 90px;
}

.side-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
}

.side-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-card p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
}

.side-plan {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 4px;
}

.side-budget {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 12px;
}

.side-note {
    font-size: 13px;
    color: var(--gray);
    margin: 0;
}

/* Dashboard responsive */
@media (max-width: 900px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .plan-cards { grid-template-columns: 1fr; }
    .pj-view-grid { grid-template-columns: 1fr; }
    .pj-view-side { position: static; }
    .radio-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .dash-hero { flex-direction: column; align-items: flex-start; }
    .radio-row { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; text-align: center; }
}

/* ── Designer pages ─────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.filter-btn {
    padding: .35rem .85rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.filter-btn:hover { background: #e2e8f0; }
.filter-btn.active { background: var(--primary); color: #fff; }
.filter-sep { color: #cbd5e1; padding: 0 .25rem; }

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.case-card {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.case-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); }
.case-cover { width: 100%; height: 160px; object-fit: cover; }
.case-cover-empty {
    width: 100%;
    height: 160px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
}
.case-body { padding: 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.case-meta-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.case-industry {
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: .2rem .65rem;
}
.case-title { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.3; }
.case-desc { font-size: .85rem; color: #64748b; margin: 0; line-height: 1.5; }
.case-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.case-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.case-budget { font-weight: 800; color: var(--primary); font-size: .95rem; }
.case-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.btn-sm { padding: .4rem .85rem; font-size: .82rem; }

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.work-card {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}
.work-thumb { width: 100%; height: 130px; object-fit: cover; }
.work-thumb-empty {
    width: 100%;
    height: 130px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
}
.work-info { padding: .75rem 1rem .25rem; }
.work-title { font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
.work-meta { font-size: .8rem; color: #64748b; margin-bottom: .4rem; }
.work-actions { padding: .5rem 1rem .75rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.work-list { display: flex; flex-direction: column; gap: 1rem; }
.work-list-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 1rem;
}
.work-list-thumb img, .work-list-thumb .thumb-placeholder {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}
.thumb-placeholder {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #cbd5e1;
}
.work-list-title { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .35rem; }
.work-list-meta { font-size: .82rem; color: #64748b; margin-bottom: .3rem; }
.work-list-date { font-size: .78rem; color: #94a3b8; }
.work-feedback {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: .5rem .75rem;
    border-radius: 0 6px 6px 0;
    font-size: .82rem;
    color: #78350f;
    margin: .4rem 0;
}
.work-list-actions { display: flex; flex-direction: column; gap: .5rem; min-width: 110px; }

.pv-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}
.pv-main { display: flex; flex-direction: column; gap: 1.25rem; }
.pv-side { position: sticky; top: 90px; }
.pv-cover { width: 100%; border-radius: 12px; object-fit: cover; max-height: 300px; }
.pv-row { display: flex; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid #f1f5f9; align-items: flex-start; }
.pv-row:last-child { border-bottom: none; }
.pv-label { font-size: .8rem; font-weight: 700; color: #94a3b8; min-width: 80px; padding-top: 2px; }
.pv-text { margin: 0; font-size: .9rem; line-height: 1.6; color: #334155; }
.pill-group { display: flex; flex-wrap: wrap; gap: .35rem; }
.price-big { font-size: 1.3rem; color: var(--primary); }

.notice { padding: .9rem 1.2rem; border-radius: 10px; margin-bottom: 1.25rem; font-size: .9rem; }
.notice.success { background: #dcfce7; color: #166534; }
.notice.error   { background: #fee2e2; color: #991b1b; }

.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: #374151; }
.form-input {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border .15s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
textarea.form-input { resize: vertical; min-height: 100px; }

/* password show/hide toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.8rem !important; width: 100%; box-sizing: border-box; }
.pw-eye {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    padding: .2rem;
    display: flex;
    align-items: center;
}
.pw-eye:hover { color: var(--primary); }

@media (max-width: 768px) {
    .pv-layout { grid-template-columns: 1fr; }
    .pv-side { position: static; }
    .work-list-row { grid-template-columns: 80px 1fr; }
    .work-list-actions { grid-column: 1 / -1; flex-direction: row; }
    .case-grid { grid-template-columns: 1fr; }
}

/* ── Agency pages ───────────────────────────────────────── */
.ag-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.ag-project-card {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ag-cover { width: 100%; height: 150px; object-fit: cover; }
.ag-cover-empty {
    width: 100%;
    height: 150px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
}
.ag-card-body { padding: .9rem 1rem; flex: 1; }
.ag-card-meta  { font-size: .75rem; color: #94a3b8; margin-bottom: .25rem; }
.ag-card-title { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.ag-card-sub   { font-size: .82rem; color: #64748b; margin-bottom: .5rem; }
.ag-card-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.ag-card-actions { padding: .75rem 1rem; border-top: 1px solid #f1f5f9; }

.ag-list { display: flex; flex-direction: column; gap: 1rem; }
.ag-list-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 1rem;
}
.ag-list-thumb img { width: 110px; height: 75px; border-radius: 8px; object-fit: cover; }
.ag-list-company { font-size: .78rem; color: #94a3b8; margin-bottom: .2rem; }
.ag-list-title { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.ag-list-meta  { font-size: .82rem; color: #64748b; }
.ag-list-actions { display: flex; flex-direction: column; gap: .5rem; min-width: 110px; }

.pill-alert {
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .75rem;
    font-weight: 700;
}

/* review cards (project_manage) */
.review-card {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.review-card.review-approved { border-left: 4px solid #22c55e; }
.review-card.review-pending  { border-left: 4px solid #f59e0b; }
.review-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.review-designer { display: flex; flex-direction: column; gap: .2rem; }
.review-content { display: flex; gap: 1.25rem; margin-bottom: 1rem; }
.review-thumb { width: 180px; height: 110px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.review-detail { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.review-row { display: flex; gap: .75rem; align-items: flex-start; }
.review-actions { display: flex; flex-direction: column; gap: .75rem; border-top: 1px solid #f1f5f9; padding-top: .75rem; }
.review-action-form { display: flex; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.review-feedback-wrap { display: flex; flex-direction: column; gap: .5rem; flex: 1; }

/* quote cards (company project_view) */
.quote-list { display: flex; flex-direction: column; gap: 1rem; }
.quote-card {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem;
}
.quote-card.quote-accepted { border-left: 4px solid #22c55e; }
.quote-card.quote-rejected { border-left: 4px solid #ef4444; opacity: .65; }
.quote-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.quote-ag-name { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.quote-ag-meta { font-size: .82rem; color: #64748b; }
.quote-amount  { font-weight: 800; font-size: 1.2rem; color: var(--primary); margin-bottom: .35rem; }
.quote-note    { margin-top: .75rem; font-size: .875rem; color: #475569; line-height: 1.6; white-space: pre-wrap; background: #f8fafc; padding: .65rem .9rem; border-radius: 8px; }
.quote-status-box { text-align: center; padding: .5rem 0; }
.quote-status-label { font-size: .78rem; color: #94a3b8; margin-bottom: .35rem; }
.quote-price { font-weight: 800; font-size: 1.3rem; color: var(--primary); margin-bottom: .5rem; }

@media (max-width: 640px) {
    .ag-list-row { grid-template-columns: 80px 1fr; }
    .ag-list-actions { grid-column: 1 / -1; flex-direction: row; }
    .review-content { flex-direction: column; }
    .review-thumb { width: 100%; height: 180px; }
    .ag-project-grid { grid-template-columns: 1fr; }
}

/* ── Project Progress Bar ── */
.pj-progress {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.25rem 1.5rem 1.5rem;
    margin: 0 0 2rem;
    overflow-x: auto;
}
.pj-progress-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #94a3b8;
    margin: 0 0 1.25rem;
}
.pj-steps {
    display: flex;
    min-width: 540px;
}
.pj-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}
.pj-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 13px;
    left: calc(50% + 14px);
    width: calc(100% - 28px);
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.pj-step.step-done:not(:last-child)::after {
    background: #22c55e;
}
.pj-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-bottom: .55rem;
    flex-shrink: 0;
}
.pj-step.step-done .pj-step-dot {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
.pj-step.step-active .pj-step-dot {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 0 4px #dbeafe;
}
.pj-step-label {
    font-size: .78rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.3;
    padding: 0 .2rem;
}
.pj-step.step-done .pj-step-label,
.pj-step.step-active .pj-step-label {
    color: #1e293b;
}
.pj-step-sub {
    font-size: .68rem;
    color: #94a3b8;
    margin-top: .25rem;
    line-height: 1.5;
    padding: 0 .2rem;
    white-space: pre-line;
}
.pj-step.step-active .pj-step-sub {
    color: #3b82f6;
    font-weight: 500;
}
.pj-step.step-done .pj-step-sub {
    color: #64748b;
}

/* ── Custom Modal (sxAlert / sxConfirm) ── */
.sx-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.sx-modal-overlay.open {
    display: flex;
    animation: sxFadeIn .17s ease;
}
@keyframes sxFadeIn { from { opacity:0 } to { opacity:1 } }
.sx-modal-box {
    background: #fff;
    border-radius: 18px;
    padding: 2rem 2rem 1.6rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    animation: sxSlideUp .2s cubic-bezier(.16,.87,.47,1);
}
@keyframes sxSlideUp {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.sx-modal-icon  { font-size: 2.25rem; margin-bottom: .65rem; line-height: 1; }
.sx-modal-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: .45rem; }
.sx-modal-body  { font-size: .9rem; color: #475569; line-height: 1.72; margin-bottom: 1.6rem; min-height: .5rem; white-space: pre-wrap; }
.sx-modal-btns  { display: flex; justify-content: flex-end; gap: .65rem; }