/* ============================================
   HR Practice Partner - Design System
   Mobile-first | Dark Premium Theme
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Colours */
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-tertiary: #1A1A1A;
    --accent-pink: #FF0A78;
    --accent-orange: #FF6A00;
    --text-primary: #FFFFFF;
    --text-muted: #A0A0A0;
    --text-dim: #666666;
    --border-color: #2A2A2A;
    --border-hover: #3A3A3A;
    --success: #22C55E;
    --error: #EF4444;
    --warning: #F59E0B;

    /* Typography */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --fw-heading: 600;
    --fw-heading-heavy: 700;
    --fw-body: 400;
    --fw-body-medium: 500;
    --fw-body-bold: 700;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 60px;
    --container-max: 1280px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow-pink: 0 0 20px rgba(255, 10, 120, 0.15);
    --shadow-glow-orange: 0 0 20px rgba(255, 106, 0, 0.15);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: var(--fw-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent-pink);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-orange);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-heading);
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: var(--fw-heading-heavy);
}

h2 {
    font-size: clamp(1.375rem, 3vw, 2rem);
}

h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h4 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* App layout: sidebar + main */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: var(--space-lg);
    padding-top: calc(var(--header-height) + var(--space-lg));
    min-width: 0;
    max-width: 1400px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.site-footer {
    margin-top: var(--space-2xl);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--accent-pink), var(--accent-orange)) 1;
}

.footer-top {
    background: var(--bg-primary);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-pink);
}

.footer-bottom {
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-orange));
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom p {
    font-size: 0.7rem;
    margin: 0;
    color: #FFFFFF;
    opacity: 0.9;
}

.site-footer a {
    color: inherit;
}

@media (max-width: 640px) {
    .footer-top, .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* --- Impersonation Bar --- */
.impersonate-bar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #FFFFFF;
    padding: var(--space-xs) var(--space-lg);
    margin: calc(-1 * var(--space-lg));
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
}
.impersonate-bar-inner {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 1200px;
}
.impersonate-bar-inner svg {
    flex-shrink: 0;
}
.impersonate-bar-btn {
    background: rgba(255,255,255,0.2);
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius);
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    font-size: var(--text-xs);
    font-weight: var(--fw-body-medium);
    transition: background 0.2s;
    white-space: nowrap;
}
.impersonate-bar-btn:hover {
    background: rgba(255,255,255,0.35);
}

/* --- Page Header --- */
.page-header {
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    margin-bottom: var(--space-sm);
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

.grid-3 {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

.grid-4 {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

.grid-5 {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

/* --- Cards --- */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-clickable {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.card-icon svg {
    width: 22px;
    height: 22px;
}

.card-icon-pink {
    background: rgba(255, 10, 120, 0.12);
    color: var(--accent-pink);
}

.card-icon-orange {
    background: rgba(255, 106, 0, 0.12);
    color: var(--accent-orange);
}

.card h3, .card h4 {
    margin-bottom: var(--space-sm);
}

.card p {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

/* Stat cards */
.stat-card {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: var(--fw-heading-heavy);
    margin-bottom: var(--space-xs);
}

.stat-label {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: var(--fw-heading);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: var(--fw-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    min-height: 44px;
    min-width: 44px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-orange));
    color: #FFFFFF;
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow-pink);
    color: #FFFFFF;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-pink);
    border: 2px solid var(--accent-pink);
}

.btn-secondary:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.65rem 1.4rem;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.btn-dark {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
}

.btn-dark:hover {
    filter: brightness(1.3);
    color: var(--text-primary);
}

.btn-orange {
    background: var(--accent-orange);
    color: #FFFFFF;
    border: none;
}

.btn-orange:hover {
    filter: brightness(1.1);
    color: #FFFFFF;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.68rem;
    min-height: 36px;
}

.btn-lg {
    padding: 0.85rem 1.8rem;
    font-size: 0.88rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 44px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: var(--fw-heading);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 100px;
    line-height: 1.4;
}

.badge-pink {
    background: rgba(255, 10, 120, 0.15);
    color: var(--accent-pink);
}

.badge-orange {
    background: rgba(255, 106, 0, 0.15);
    color: var(--accent-orange);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.badge-muted {
    background: rgba(160, 160, 160, 0.15);
    color: var(--text-muted);
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: var(--fw-heading);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    min-height: 44px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(255, 10, 120, 0.15);
}

.form-input::placeholder {
    color: var(--text-dim);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A0A0A0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-right: 2.75rem;
}

.form-input-icon .input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
}

/* --- Alerts --- */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-info {
    background: rgba(255, 10, 120, 0.08);
    border: 1px solid rgba(255, 10, 120, 0.2);
    color: var(--accent-pink);
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    font-weight: var(--fw-body-medium);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.table-actions {
    display: flex;
    gap: var(--space-sm);
}

/* --- Sidebar Navigation --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-brand {
    padding: var(--space-lg) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-brand a {
    justify-content: center;
}

.sidebar-logo-img {
    height: 52px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
    overflow-y: auto;
}

.nav-list {
    padding: 0 var(--space-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.65rem var(--space-lg);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.nav-link:hover {
    color: var(--accent-orange);
    background: rgba(255, 106, 0, 0.1);
}

.nav-link.active {
    color: var(--accent-pink);
    background: rgba(255, 10, 120, 0.15);
}

.nav-link-muted {
    font-size: 0.85rem;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--space-md) var(--space-lg);
}

/* Sidebar user area */
.sidebar-user {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fw-body-bold);
    font-size: 0.85rem;
    flex-shrink: 0;
}

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

.user-name {
    font-size: 0.85rem;
    font-weight: var(--fw-body-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-logout {
    color: var(--text-muted);
    transition: color var(--transition-fast);
    padding: var(--space-sm);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    color: var(--error);
}

.logout-form {
    display: inline;
}

/* Mobile header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    z-index: 99;
}

.mobile-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.mobile-logo-img {
    height: 28px;
    width: auto;
}

.mobile-header-spacer {
    width: 44px;
}

/* Hamburger */
.hamburger {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.nav-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
    font-weight: var(--fw-body-medium);
    color: var(--text-muted);
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

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

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* --- Filter Pills --- */
.filter-pills {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: var(--fw-body-medium);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    min-height: 36px;
    display: flex;
    align-items: center;
}

.filter-pill:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.filter-pill.active {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
    color: #FFFFFF;
}

/* --- Search Bar --- */
.search-bar {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-bar .form-input {
    padding-left: 2.75rem;
}

.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

/* --- Progress Bar --- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-orange));
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.progress-bar-lg {
    height: 10px;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: var(--fw-body-medium);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 360px;
}

.toast-success {
    background: var(--success);
    color: #FFFFFF;
}

.toast-error {
    background: var(--error);
    color: #FFFFFF;
}

.toast-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: var(--space-md);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.visible .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* --- Accordion --- */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.95rem;
    font-weight: var(--fw-body-medium);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
    transition: background var(--transition-fast);
}

.accordion-trigger:hover {
    background: rgba(255, 255, 255, 0.03);
}

.accordion-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.accordion-body {
    padding: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
    background: #FFF5EB;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    margin: 0 var(--space-lg) var(--space-lg);
    color: #1A1A1A;
    line-height: 1.6;
}

/* --- Cookie Consent --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent-pink);
    padding: var(--space-lg) var(--space-xl);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.cookie-banner-text p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.cookie-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.cookie-settings-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.cookie-settings-header h3 {
    margin: 0;
}

.cookie-settings-body {
    padding: var(--space-lg);
}

.cookie-category {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
}

.cookie-category h4 {
    margin-bottom: var(--space-xs);
    font-size: 0.85rem;
}

.cookie-category p {
    font-size: 0.78rem;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: background var(--transition-fast);
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: rgba(255, 10, 120, 0.15);
    border-color: var(--accent-pink);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
    background: var(--accent-pink);
}

.cookie-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-banner-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* --- Announcement Banner --- */
.announcement {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-pink);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.announcement-content {
    flex: 1;
}

.announcement-label {
    font-size: 0.75rem;
    font-weight: var(--fw-body-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-pink);
    margin-bottom: var(--space-xs);
}

.announcement-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.announcement-dismiss {
    color: var(--text-muted);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-dismiss:hover {
    color: var(--text-primary);
}

/* --- File Upload Zone --- */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.upload-zone:hover {
    border-color: var(--accent-pink);
    background: rgba(255, 10, 120, 0.03);
}

.upload-zone-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--space-md);
    color: var(--text-dim);
}

/* --- Locked State --- */
.card-locked {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.card-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: rgba(10, 10, 10, 0.4);
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: var(--text-muted);
}

/* --- Section Divider --- */
.section-divider {
    margin: var(--space-2xl) 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* --- Coming Soon Badge --- */
.coming-soon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: var(--fw-body-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-orange);
    background: rgba(255, 106, 0, 0.1);
    border: 1px dashed rgba(255, 106, 0, 0.3);
    border-radius: var(--radius-full);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-lg);
    color: var(--text-dim);
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

/* --- Quick Actions --- */
.quick-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

/* --- Focus Styles --- */
*:focus-visible {
    outline: 2px solid var(--accent-pink);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* --- Colour Swatches --- */
.colour-swatches {
    display: flex;
    gap: var(--space-md);
}

.colour-swatch {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.colour-swatch.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-primary);
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--accent-pink);
}

.breadcrumb-sep {
    color: var(--text-dim);
}

/* --- Login Page --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
    background: var(--bg-primary);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(255, 10, 120, 0.06) 0%, transparent 60%);
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-brand {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-logo-img {
    height: 64px;
    width: auto;
    margin: 0 auto var(--space-sm);
    display: block;
}

.login-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-error {
    display: none;
    margin-bottom: var(--space-lg);
}

.login-error.visible {
    display: flex;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.login-footer {
    text-align: center;
    margin-top: var(--space-lg);
}

.login-footer a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-footer a:hover {
    color: var(--accent-pink);
}

/* --- Dashboard Section Cards --- */
.section-card {
    position: relative;
    overflow: hidden;
}

.section-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.section-card .card-icon svg {
    width: 24px;
    height: 24px;
}

/* --- Template Cards (Website Builder) --- */
.template-thumb {
    width: 100%;
    height: 180px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.template-card.selected {
    border-color: var(--accent-pink);
    box-shadow: var(--shadow-glow-pink);
}

.template-actions {
    display: flex;
    gap: var(--space-sm);
}

/* --- Customisation Panel --- */
.customise-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
    display: none;
}

.customise-panel.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* --- Coaching Call Card --- */
.coaching-card {
    border-left: 3px solid var(--accent-orange);
}

/* --- Partner Card --- */
.partner-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: var(--fw-heading);
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* --- Membership Badge --- */
.membership-badge {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(255, 10, 120, 0.08), rgba(255, 106, 0, 0.08));
    border: 1px solid rgba(255, 10, 120, 0.2);
    border-radius: var(--radius-md);
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Calendar Grid --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 0.8rem;
}

.calendar-header-cell {
    background: var(--bg-secondary);
    padding: var(--space-sm);
    text-align: center;
    font-weight: var(--fw-body-medium);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.calendar-cell {
    background: var(--bg-primary);
    padding: var(--space-sm);
    min-height: 60px;
    position: relative;
}

.calendar-day {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.calendar-event {
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event-pink {
    background: rgba(255, 10, 120, 0.15);
    color: var(--accent-pink);
}

.calendar-event-orange {
    background: rgba(255, 106, 0, 0.15);
    color: var(--accent-orange);
}

/* --- Confirm Dialog --- */
.confirm-dialog .modal {
    max-width: 420px;
}

.confirm-dialog .modal-body {
    text-align: center;
}

.confirm-dialog .modal-body p {
    color: var(--text-muted);
}

/* --- Spinner --- */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-pink);
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Print --- */
@media print {
    .sidebar, .mobile-header, .nav-overlay, .toast-container, .modal-overlay,
    .btn, button, .hamburger, .site-footer {
        display: none !important;
    }
    body {
        background: #FFFFFF;
        color: #000000;
    }
    .main-content {
        padding: 0;
        margin: 0;
    }
    .card {
        border: 1px solid #CCC;
        break-inside: avoid;
    }
    .gradient-text {
        -webkit-text-fill-color: #000000;
        background: none;
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet (768px+) */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    .nav-overlay {
        display: none;
    }

    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--sidebar-width);
        padding: var(--space-xl) var(--space-2xl);
        padding-top: var(--space-xl);
    }

    .site-footer {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .impersonate-bar {
        margin: calc(-1 * var(--space-xl)) calc(-1 * var(--space-2xl));
        margin-bottom: var(--space-xl);
        padding: var(--space-xs) var(--space-2xl);
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-card {
        padding: var(--space-3xl);
    }

    .modal {
        max-height: 80vh;
    }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
    .main-content {
        padding: var(--space-2xl) var(--space-3xl);
    }

    .impersonate-bar {
        margin: calc(-1 * var(--space-2xl)) calc(-1 * var(--space-3xl));
        margin-bottom: var(--space-2xl);
        padding: var(--space-xs) var(--space-3xl);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }

    .calendar-cell {
        min-height: 80px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   WEBSITE BUILDER SHARED COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* --- Toggle Switch (used in editor & section enable/disable) --- */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
}

.toggle-switch input:checked + .toggle-slider::before {
    background: #fff;
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
}

/* --- Copy button (used in domain & email pages) --- */
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copy:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.btn-copy.copied {
    border-color: var(--success);
    color: var(--success);
}

/* --- Toast notification --- */
.copy-toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--success);
    color: var(--success);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

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

/* --- Spin animation (used in loading states) --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* --- Builder image upload thumbnail --- */
.upload-zone img {
    max-height: 100px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

/* Utility: hidden at breakpoints */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: initial;
    }
    .hide-desktop {
        display: none;
    }
}
