@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --primary: #ff5e36;
    --primary-hover: #e54d27;
    --primary-gradient: linear-gradient(135deg, #ff5e36 0%, #ff8e53 100%);
    --secondary: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --whatsapp: #25d366;

    --bg-app: #f4f6fb;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e5eaf2;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(255, 94, 54, 0.16);

    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 50px rgba(15, 23, 42, 0.12);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --max-width: 1280px;
    --nav-height: 68px;
    --sidebar-width: 268px;
    --topbar-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: auto;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

input, select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 94, 54, 0.14);
}

input[type="checkbox"],
input[type="radio"],
input[type="file"] {
    width: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 0.92rem;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 18px rgba(255, 94, 54, 0.22);
}

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

button:disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #f8fafc;
}

.btn-dark {
    background-color: var(--text-main);
    color: white;
}

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

.btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== PUBLIC HEADER ========== */
.public-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-family: var(--font-heading);
    font-weight: 800;
}

.logo span:not(.brand-mark),
.brand-text span,
.footer-brand span {
    color: var(--primary);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    min-width: 0;
}

.nav-link {
    white-space: nowrap;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
}

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

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

.menu-toggle {
    display: none;
    font-size: 1.4rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-only {
    display: none;
}

.profile-menu {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    border: 1px solid var(--border);
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 0.9rem;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.caret {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1010;
}

.profile-dropdown.show {
    display: flex;
}

.dropdown-meta {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--bg-app);
    color: var(--primary);
}

.dropdown-item.danger {
    color: var(--danger);
}

/* ========== APP SHELL ========== */
.layout-app {
    display: flex;
    min-height: 100vh;
    background: var(--bg-app);
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    z-index: 40;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 18px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-text {
    color: white;
}

.sidebar-nav {
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-section-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    padding: 12px 12px 6px;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 0.92rem;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-link.is-active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-link-danger:hover {
    color: #fca5a5;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-meta strong {
    font-size: 0.88rem;
    color: white;
}

.sidebar-user-meta span {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-frame {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: var(--topbar-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 16px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-logo {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    white-space: nowrap;
    line-height: 1;
}

.topbar-logo .brand-mark {
    width: 30px;
    height: 30px;
}

.topbar-logo span:last-child {
    color: var(--primary);
}

.topbar-heading h1 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.topbar-heading p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.app-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px 28px 48px;
    flex: 1;
}

.app-footer {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 16px 24px 22px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    background: transparent;
}

.sidebar-backdrop {
    display: none;
}

/* ========== PAGE CHROME ========== */
.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}

.page-hero > div:first-child {
    flex: 1 1 240px;
    min-width: 0;
}

.page-hero h2 {
    font-size: 1.7rem;
}

.page-lead {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.role-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
}

.role-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.role-tab {
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.role-tab:hover {
    background: var(--bg-app);
    color: var(--text-main);
}

.role-tab.is-active {
    background: var(--primary-gradient);
    color: white;
}

.page-narrow {
    max-width: 760px;
    margin: 0 auto;
}

.card-title {
    margin-bottom: 16px;
    font-size: 1.05rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 24px;
}

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

.profile-photo-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    flex-shrink: 0;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.choice-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.choice-card strong {
    display: block;
}

.choice-card span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.choice-card-vip {
    border-color: rgba(245, 158, 11, 0.35);
    background: #fffbeb;
}

.choice-card.is-static {
    cursor: default;
}

.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ========== LANDING ========== */
.public-main {
    min-height: calc(100vh - var(--nav-height));
}

.hero-section {
    padding: 72px 24px 80px;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 94, 54, 0.1) 0%, transparent 46%),
        radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 48%);
    text-align: center;
}

.hero-container {
    max-width: 780px;
    margin: 0 auto;
}

.badge-tag {
    background-color: rgba(255, 94, 54, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-vip {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.badge-on-dark {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.18);
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.12;
    margin-bottom: 18px;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.features-section {
    padding: 72px 24px;
    background: white;
    border-top: 1px solid var(--border);
}

.section-inner,
.showcase-section {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-intro {
    text-align: center;
    margin-bottom: 40px;
}

.section-intro h2,
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin-bottom: 8px;
}

.section-intro p,
.section-subtitle {
    color: var(--text-muted);
}

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

.feature-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-app);
}

.feature-icon {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.showcase-section {
    padding: 72px 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 32px;
}

.text-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

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

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-image-container {
    height: 200px;
    background-color: #f1f5f9;
    position: relative;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-featured {
    position: absolute;
    top: 14px;
    right: 14px;
    background-color: #ffb800;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
}

.shop-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.product-meta.stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.product-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 16px;
}

.vip-cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
}

.vip-cta-inner {
    max-width: 700px;
    margin: 0 auto;
}

.vip-cta-inner h2 {
    color: white;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin-bottom: 12px;
}

.vip-cta-inner p {
    color: #94a3b8;
    margin-bottom: 24px;
}

/* ========== AUTH MODAL ========== */
dialog::backdrop {
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
}

.auth-dialog {
    display: none;
    border: none;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 24px);
    margin: auto;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    background-color: var(--bg-card);
}

.auth-dialog[open] {
    display: flex;
    flex-direction: column;
}

.dialog-header {
    background: var(--primary-gradient);
    color: white;
    padding: 26px 48px 22px;
    position: relative;
    text-align: center;
}

.dialog-header h3 {
    color: white;
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.dialog-header p {
    margin: 0;
}

.dialog-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.dialog-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    font-family: inherit;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.dialog-body {
    padding: 24px;
    overflow-y: auto;
    min-height: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.84rem;
    margin-bottom: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
}

.form-row > * {
    min-width: 0;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.phone-field {
    display: flex;
    align-items: stretch;
}

.phone-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.phone-field input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.field-tip {
    position: relative;
}

.field-tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 8;
    background: #0f172a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.field-tip:hover::after,
.field-tip:focus-within::after {
    opacity: 1;
    visibility: visible;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }

.helper-links {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.helper-links a {
    color: var(--primary);
    font-weight: 600;
}

/* ========== DASHBOARD COMPONENTS ========== */
.dashboard-wrapper {
    padding: 0;
    max-width: none;
}

.layout-public .dashboard-wrapper {
    padding: 48px 20px 64px;
    max-width: 1280px;
    margin: 0 auto;
}

.dashboard-grid {
    display: block;
}

.sidebar-panel {
    display: none;
}

.main-panel {
    min-height: auto;
}

.user-profile-card {
    text-align: center;
}

.big-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    color: white;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.role-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.role-client { background-color: rgba(59, 130, 246, 0.12); color: var(--secondary); }
.role-buyer { background-color: rgba(16, 185, 129, 0.12); color: var(--success); }
.role-vip { background-color: rgba(245, 158, 11, 0.14); color: #b45309; }
.role-admin { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); color: white; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    margin-top: 4px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.order-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.order-id { font-weight: 700; }

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background-color: #fef3c7; color: #d97706; }
.status-assigned { background-color: #e0f2fe; color: #0284c7; }
.status-in_progress { background-color: #e0e7ff; color: #4f46e5; }
.status-completed { background-color: #d1fae5; color: #059669; }
.status-cancelled { background-color: #fee2e2; color: #dc2626; }

.order-details p {
    margin-bottom: 8px;
    font-size: 0.94rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.order-cost { font-weight: 700; }

.dashboard-form-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.table-responsive {
    overflow-x: auto;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

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

.site-footer {
    background-color: #0b0f19;
    color: #94a3b8;
    padding: 36px 24px;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 8px;
}

.footer-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
}

/* ========== LARGE MONITORS ========== */
@media (min-width: 1200px) {
    .layout-app #sidebarToggle {
        display: none;
    }
}

@media (min-width: 1440px) {
    .app-content {
        padding: 28px 36px 56px;
    }
    :root { --max-width: 1360px; }
    .hero-container { max-width: 920px; }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1800px) {
    :root {
        --sidebar-width: 280px;
        --max-width: 1520px;
    }
    .app-content {
        padding: 32px 48px 64px;
    }
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
    .features-grid,
    .products-grid {
        gap: 28px;
    }
    .hero-title {
        font-size: 3.6rem;
    }
}

/* ========== TABLET / MOBILE ========== */
@media (max-width: 1100px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1199px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: none;
        z-index: 80;
    }
    .app-sidebar.is-open,
    body.sidebar-open .app-sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 70;
    }
    .sidebar-backdrop[hidden] {
        display: none !important;
    }

    .app-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 60;
        height: 64px;
        padding: 0 12px;
    }

    .layout-app .app-frame {
        padding-top: 64px;
    }

    .topbar-heading {
        display: none;
    }

    .topbar-logo {
        display: inline-flex;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .topbar-left,
    .app-topbar .nav-actions {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 1100px) {
    .menu-toggle { display: block; }
    .mobile-only { display: list-item; margin-top: 16px; }
    .profile-name { display: none; }
    .public-header .nav-actions .btn { display: none; }

    .public-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--nav-height);
        min-height: var(--nav-height);
        z-index: 1000;
    }

    .layout-public {
        padding-top: var(--nav-height);
    }

    .public-header .nav-container {
        position: relative;
        justify-content: space-between;
        align-items: center;
        height: var(--nav-height);
        padding: 0 16px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .public-header .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.05rem;
        white-space: nowrap;
    }

    .menu-toggle,
    .public-header .nav-actions {
        position: relative;
        z-index: 1;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: white;
        flex-direction: column;
        padding: 28px 24px;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border);
        z-index: 999;
    }
    .nav-menu.active { left: 0; }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-section,
    .features-section,
    .showcase-section,
    .vip-cta-section {
        padding: 48px 16px;
    }

    .app-content {
        padding: 18px 14px 36px;
    }

    .app-topbar {
        padding: 0 12px;
        height: 64px;
    }

    .app-footer {
        flex-direction: column;
        align-items: center;
        padding: 14px 16px 22px;
    }

    .form-row { grid-template-columns: 1fr; }
    .page-hero h2 { font-size: 1.35rem; }
    .dashboard-form-container { padding: 16px; }
}

@media (max-width: 768px) {
    .role-tabs {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-buttons .btn,
    .form-actions .btn {
        width: 100%;
    }
    .order-footer,
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-hero {
        padding: 16px;
    }
    .panel-intro h2 {
        font-size: 1.25rem;
    }
}

/* ========== PANEL SURFACES ========== */
.panel-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.panel-intro h2 {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.panel-intro p,
.muted {
    color: var(--text-muted);
}

.panel-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}

#panel-client .panel-intro > div,
#panel-vip .panel-intro > div {
    width: 100%;
}

#panel-client .panel-kicker,
#panel-buyer .panel-kicker,
#panel-vip .panel-kicker {
    text-align: center;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--text-main);
    margin-bottom: 8px;
}

#panel-buyer .panel-kicker {
    width: 100%;
}

.work-zone {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    flex: 1 1 100%;
}

.work-zone h2 {
    margin-bottom: 4px;
}

.work-zone > p {
    margin-bottom: 14px;
}

.work-zone h4 {
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.work-zone form {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zone-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 104px;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.stats-row .stat-card:nth-child(2)::before { background: var(--success); }
.stats-row .stat-card:nth-child(3)::before { background: var(--warning); }
.stats-row .stat-card:nth-child(4)::before { background: var(--secondary); }

.stat-val {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.callout {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.callout-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.callout-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 94, 54, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.callout h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.callout p,
.soft-note {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 0;
}

.soft-panel {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 20px 22px;
    border-radius: 16px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title-row h3 {
    font-size: 1.15rem;
}

.search-field {
    padding: 10px 14px;
    font-size: 0.85rem;
    max-width: 360px;
    width: 100%;
    background: #fff;
}

table {
    min-width: 720px;
}

th {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

tbody tr:hover td {
    background: #f8fafc;
}

.table-responsive {
    box-shadow: var(--shadow-sm);
}

.order-card {
    transition: box-shadow 0.2s ease;
}

.order-card:hover {
    box-shadow: var(--shadow-md);
}

.subhead {
    margin: 4px 0 14px;
    font-size: 1.15rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.my-reputation,
.buyer-score,
.proposal-score {
    margin-top: 8px;
}

.rep-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rep-stars {
    display: inline-flex;
    gap: 2px;
}

.rep-star,
.rate-star {
    width: 22px;
    height: 22px;
    color: #fff;
    display: inline-flex;
}

.rep-star svg,
.rate-star svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: #cbd5e1;
    stroke-width: 1.4;
    stroke-linejoin: round;
}

.rep-score.level-red .rep-star.is-on { color: #dc2626; }
.rep-score.level-amber .rep-star.is-on { color: #d97706; }
.rep-score.level-green .rep-star.is-on { color: #059669; }
.rep-score.level-blue .rep-star.is-on { color: #2563eb; }

.rep-score.level-red .rep-star.is-on svg,
.rep-score.level-amber .rep-star.is-on svg,
.rep-score.level-green .rep-star.is-on svg,
.rep-score.level-blue .rep-star.is-on svg,
.rate-picker[data-paint="red"] .rate-star.is-on svg,
.rate-picker[data-paint="red"] .rate-star.is-preview svg,
.rate-picker[data-paint="amber"] .rate-star.is-on svg,
.rate-picker[data-paint="amber"] .rate-star.is-preview svg,
.rate-picker[data-paint="green"] .rate-star.is-on svg,
.rate-picker[data-paint="green"] .rate-star.is-preview svg,
.rate-picker[data-paint="blue"] .rate-star.is-on svg,
.rate-picker[data-paint="blue"] .rate-star.is-preview svg {
    stroke: currentColor;
}

.rate-picker[data-paint="red"] .rate-star.is-on,
.rate-picker[data-paint="red"] .rate-star.is-preview { color: #dc2626; }
.rate-picker[data-paint="amber"] .rate-star.is-on,
.rate-picker[data-paint="amber"] .rate-star.is-preview { color: #d97706; }
.rate-picker[data-paint="green"] .rate-star.is-on,
.rate-picker[data-paint="green"] .rate-star.is-preview { color: #059669; }
.rate-picker[data-paint="blue"] .rate-star.is-on,
.rate-picker[data-paint="blue"] .rate-star.is-preview { color: #2563eb; }

.rep-meta,
.rep-empty {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.rep-score.level-red .rep-meta strong { color: #dc2626; }
.rep-score.level-amber .rep-meta strong { color: #d97706; }
.rep-score.level-green .rep-meta strong { color: #059669; }
.rep-score.level-blue .rep-meta strong { color: #2563eb; }

.rep-opinions {
    border: 0;
    background: transparent;
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.rate-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.rate-box h4 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.rate-kicker {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.rate-picker {
    display: flex;
    gap: 6px;
}

.rate-star {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.rate-star svg {
    width: 36px;
    height: 36px;
}

.rate-level-label {
    margin: 8px 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.rate-comment-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.rate-comment {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font: inherit;
    resize: vertical;
}

.rate-counter {
    display: block;
    margin: 4px 0 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rate-done-comment {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--text-main);
}

.ratings-modal[hidden] {
    display: none;
}

.ratings-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ratings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.ratings-dialog {
    position: relative;
    width: min(520px, 100%);
    max-height: min(80vh, 720px);
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ratings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 8px;
}

.ratings-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.ratings-close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

#ratings-modal-summary {
    padding: 0 16px 12px;
}

#ratings-modal-summary .rep-opinions {
    display: none;
}

.ratings-scroll {
    overflow-y: auto;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: var(--bg-app);
}

.rating-item-who {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.rating-item-comment {
    margin: 6px 0 0;
    font-size: 0.9rem;
}

.rating-item-comment.is-empty,
.ratings-loading {
    color: var(--text-muted);
    font-size: 0.85rem;
}

body.ratings-open {
    overflow: hidden;
}

.accept-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.accept-box h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.accept-help,
.wait-note,
.assign-notice {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.accept-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-app);
}

.accept-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wait-note,
.assign-notice {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.page-confirm[hidden] {
    display: none;
}

.page-confirm {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.page-confirm-card {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.page-confirm-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.page-confirm-card p {
    margin: 0 0 18px;
    color: var(--text-main);
}

.page-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .zone-row {
        grid-template-columns: 1fr;
    }
    .callout {
        align-items: flex-start;
    }
    .search-field {
        max-width: none;
    }
}
