/* ==========================================================================
   FileShareWeb Design System & Authentic Styles
   Matches original https://fsw.impesoft.com/
   ========================================================================== */

:root,
html[data-theme="light"] {
    color-scheme: light;

    /* 5-Level Strict Typographic Scale */
    --font-size-xs: 0.75rem;
    /* 12px: Badges, eyebrows, timestamps */
    --font-size-sm: 0.875rem;
    /* 14px: Secondary text, descriptions, hints */
    --font-size-base: 1rem;
    /* 16px: Body text, inputs, buttons, dropdowns */
    --font-size-lg: 1.25rem;
    /* 20px: Card titles, section headers */
    --font-size-xl: 1.75rem;
    /* 28px: Main page titles (h1) */

    /* Form & Control Dimensions */
    --control-height: 2.75rem;
    /* 44px: Comfortable modern height */
    --control-radius: 0.5rem;

    /* Base Surfaces & Layout (Warm Paper Stone) */
    --bg-app: #fafaf9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-subtle: #f5f5f4;
    --bg-surface-hover: #e7e5e4;

    /* Typography */
    --text-main: #292524;
    --text-headings: #1c1917;
    --text-muted: #57534e;
    --text-dim: #78716c;
    --text-subtle: #a8a29e;

    /* Borders & Lines */
    --border-color: #e7e5e4;
    --border-subtle: #f5f5f4;
    --border-strong: #d6d3d1;
    --line: #e7e5e4;

    /* Brand / Accent - Balanced Soothing Blue */
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-primary-active: #1e40af;
    --brand-primary-text: #ffffff;

    /* Buttons */
    --btn-neutral-bg: #2563eb;
    --btn-neutral-hover: #1d4ed8;
    --btn-neutral-active: #1e40af;
    --btn-neutral-text: #ffffff;

    --btn-secondary-bg: #ffffff;
    --btn-secondary-border: #d6d3d1;
    --btn-secondary-text: #292524;
    --btn-secondary-hover-bg: #f5f5f4;
    --btn-secondary-hover-border: #a8a29e;
    --btn-secondary-hover-text: #1c1917;

    /* Inputs */
    --input-bg: #ffffff;
    --input-border: #d6d3d1;
    --input-text: #292524;
    --input-placeholder: rgba(120, 113, 108, 0.53);
    --input-focus-border: #2563eb;
    --input-focus-ring: rgba(37, 99, 235, 0.2);

    /* Status Badges & Alerts */
    --status-success-bg: #ecfdf5;
    --status-success-border: #a7f3d0;
    --status-success-text: #065f46;

    --status-warning-bg: #fffbeb;
    --status-warning-border: #fde68a;
    --status-warning-text: #92400e;

    --status-error-bg: #fef2f2;
    --status-error-border: #fecaca;
    --status-error-text: #991b1b;

    --status-neutral-bg: #f5f5f4;
    --status-neutral-text: #57534e;

    --status-info-bg: #eff6ff;
    --status-info-border: #bfdbfe;
    --status-info-text: #1e40af;

    /* Shadows */
    --card-shadow: 0 1px 3px 0 rgba(28, 25, 23, 0.05);
    --elevated-shadow: 0 10px 25px -5px rgba(28, 25, 23, 0.08);
}

html[data-theme="dark"],
[data-theme="dark"] {
    color-scheme: dark;

    /* Base Surfaces & Layout (Soft Soothing Charcoal) */
    --bg-app: #141416;
    --bg-surface: #1a1a1e;
    --bg-surface-elevated: #222228;
    --bg-surface-subtle: #17171b;
    --bg-surface-hover: #282830;

    /* Typography */
    --text-main: #e2e2e5;
    --text-headings: #f4f4f6;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --text-subtle: #52525b;

    /* Borders & Lines */
    --border-color: #27272e;
    --border-subtle: #1f1f24;
    --border-strong: #383842;
    --line: #27272e;

    /* Brand / Accent */
    --brand-primary: #60a5fa;
    --brand-primary-hover: #93c5fd;
    --brand-primary-active: #3b82f6;
    --brand-primary-text: #ffffff;

    /* Buttons */
    --btn-neutral-bg: #2563eb;
    --btn-neutral-hover: #1d4ed8;
    --btn-neutral-active: #1e40af;
    --btn-neutral-text: #ffffff;

    --btn-secondary-bg: #1a1a1e;
    --btn-secondary-border: #383842;
    --btn-secondary-text: #e2e2e5;
    --btn-secondary-hover-bg: #282830;
    --btn-secondary-hover-border: #52525b;
    --btn-secondary-hover-text: #f4f4f6;

    /* Inputs */
    --input-bg: #17171b;
    --input-border: #27272e;
    --input-text: #e2e2e5;
    --input-placeholder: rgba(113, 113, 122, 0.53);
    --input-focus-border: #60a5fa;
    --input-focus-ring: rgba(96, 165, 250, 0.25);

    /* Status Badges & Alerts */
    --status-success-bg: #062e1b;
    --status-success-border: #0d5c35;
    --status-success-text: #6ee7b7;

    --status-warning-bg: #382006;
    --status-warning-border: #663908;
    --status-warning-text: #fcd34d;

    --status-error-bg: #360c0c;
    --status-error-border: #631717;
    --status-error-text: #fca5a5;

    --status-neutral-bg: #222228;
    --status-neutral-text: #a1a1aa;

    --status-info-bg: #0b2744;
    --status-info-border: #124b82;
    --status-info-text: #93c5fd;

    /* Shadows */
    --card-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.35);
    --elevated-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.5);
}

/* Base resets inside the standalone subsite */
.standalone-fileshare,
.fsw-standalone-shell {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: var(--font-size-base);
    line-height: 1.5;
    min-height: 100vh;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.standalone-fileshare *,
.standalone-fileshare *::before,
.standalone-fileshare *::after,
.fsw-standalone-shell *,
.fsw-standalone-shell *::before,
.fsw-standalone-shell *::after {
    box-sizing: border-box;
}

/* Headings */
.fsw-standalone-shell h1,
.standalone-fileshare h1 {
    color: var(--text-headings);
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.fsw-standalone-shell h2,
.standalone-fileshare h2 {
    color: var(--text-headings);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.fsw-standalone-shell h3,
.standalone-fileshare h3 {
    color: var(--text-headings);
    font-size: var(--font-size-base);
    font-weight: 600;
}

.fsw-standalone-shell h4,
.fsw-standalone-shell h5,
.fsw-standalone-shell h6 {
    color: var(--text-headings);
    font-size: var(--font-size-sm);
}

/* Inputs & Form Controls */
.fsw-standalone-shell input[type="text"],
.fsw-standalone-shell input[type="email"],
.fsw-standalone-shell input[type="password"],
.fsw-standalone-shell input[type="number"],
.fsw-standalone-shell select,
.fsw-standalone-shell .input-text,
.fsw-standalone-shell .input-select,
.fsw-standalone-shell .text-input {
    background: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: var(--control-radius);
    font: inherit;
    font-size: var(--font-size-base);
    min-height: var(--control-height);
    height: var(--control-height);
    padding: 0.65rem 0.95rem;
    width: 100%;
    box-sizing: border-box;
    display: block;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fsw-standalone-shell input:focus,
.fsw-standalone-shell select:focus,
.fsw-standalone-shell .input-text:focus,
.fsw-standalone-shell .input-select:focus,
.fsw-standalone-shell .text-input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
    outline: none;
}

/* Generic Buttons & Links */
.fsw-standalone-shell .button-link,
.fsw-standalone-shell .site-main a.button-link,
.fsw-standalone-shell .button.primary,
.fsw-standalone-shell .button-primary {
    background: var(--btn-neutral-bg);
    border: 0;
    border-radius: var(--control-radius);
    color: var(--btn-neutral-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    min-height: var(--control-height);
    text-decoration: none;
    line-height: 1.4;
    transition: background-color 0.15s ease, transform 0.1s ease, color 0.15s ease;
}

.fsw-standalone-shell .button-link:hover,
.fsw-standalone-shell .button.primary:hover,
.fsw-standalone-shell .button-primary:hover:not(:disabled) {
    background: var(--btn-neutral-hover);
    color: var(--btn-neutral-text);
    text-decoration: none;
}

.fsw-standalone-shell .button-link:active,
.fsw-standalone-shell .button.primary:active,
.fsw-standalone-shell .button-primary:active:not(:disabled) {
    background: var(--btn-neutral-active);
    transform: translateY(1px);
}

.fsw-standalone-shell .button-secondary,
.fsw-standalone-shell .button:not(.primary):not(.danger) {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    border-radius: var(--control-radius);
    color: var(--btn-secondary-text);
    font-weight: 600;
    min-height: var(--control-height);
    padding: 0.65rem 1.25rem;
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fsw-standalone-shell .button-secondary:hover:not(:disabled),
.fsw-standalone-shell .button:not(.primary):not(.danger):hover:not(:disabled) {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--btn-secondary-hover-border);
    color: var(--btn-secondary-hover-text);
    text-decoration: none;
}

.fsw-standalone-shell .button-danger,
.fsw-standalone-shell .button.danger {
    background: var(--status-error-bg);
    border: 1px solid var(--status-error-border);
    color: var(--status-error-text);
    padding: 0.65rem 1.25rem;
    border-radius: var(--control-radius);
    font: inherit;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fsw-standalone-shell .button-danger:hover:not(:disabled),
.fsw-standalone-shell .button.danger:hover:not(:disabled) {
    background: var(--status-error-text);
    color: #ffffff;
    text-decoration: none;
}

.fsw-standalone-shell .button.small,
.fsw-standalone-shell .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: var(--font-size-sm);
    min-height: 2rem;
    height: auto;
}

.fsw-standalone-shell button:disabled,
.fsw-standalone-shell input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.fsw-standalone-shell .site-header {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 72rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
}

.fsw-standalone-shell .header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.fsw-standalone-shell .header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fsw-standalone-shell .brand {
    color: var(--text-headings);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.fsw-standalone-shell .brand:hover {
    color: var(--brand-primary);
    text-decoration: none;
}

.fsw-standalone-shell .site-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.fsw-standalone-shell .site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
}

.fsw-standalone-shell .site-nav a:hover {
    color: var(--text-main);
    text-decoration: none;
}

.fsw-standalone-shell .site-nav a.active {
    color: var(--text-headings);
    font-weight: 700;
}

/* Theme Toggle Pill */
.fsw-standalone-shell .theme-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.2rem;
    gap: 0.15rem;
    box-shadow: var(--card-shadow);
}

.fsw-standalone-shell .theme-option,
.fsw-standalone-shell .theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
    line-height: 1;
}

.fsw-standalone-shell .theme-option:hover,
.fsw-standalone-shell .theme-btn:hover {
    color: var(--text-headings);
    background: var(--bg-surface-hover);
}

.fsw-standalone-shell .theme-option.active,
.fsw-standalone-shell .theme-btn.active {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-headings);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fsw-standalone-shell .theme-icon {
    font-size: 0.85rem;
    line-height: 1;
}

@media (max-width: 640px) {
    .fsw-standalone-shell .theme-label {
        display: none;
    }

    .fsw-standalone-shell .theme-option,
    .fsw-standalone-shell .theme-btn {
        padding: 0.35rem 0.5rem;
    }
}

/* Main Container */
.fsw-standalone-shell .site-main {
    margin: 0 auto;
    max-width: 72rem;
    padding: 2rem 1.5rem 4rem;
}

/* Global Alert / Status */
.fsw-standalone-shell .fsw-alert,
.fsw-standalone-shell .alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--control-radius);
    font-size: var(--font-size-sm);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.fsw-standalone-shell .fsw-alert-error,
.fsw-standalone-shell .alert-error {
    background: var(--status-error-bg);
    border: 1px solid var(--status-error-border);
    color: var(--status-error-text);
}

.fsw-standalone-shell .fsw-alert-success,
.fsw-standalone-shell .alert-success {
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
    color: var(--status-success-text);
}

.fsw-standalone-shell .fsw-alert-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

/* ==========================================================================
   Home View Styles
   ========================================================================== */

.fsw-standalone-shell .hero {
    max-width: 52rem;
    padding: 4rem 0 3rem;
}

.fsw-standalone-shell .eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
}

.fsw-standalone-shell .hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.02;
    margin-bottom: 1.25rem;
    color: var(--text-headings);
}

.fsw-standalone-shell .hero p:not(.eyebrow) {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 48rem;
    color: var(--text-muted);
}

.fsw-standalone-shell .surface-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.fsw-standalone-shell .surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.fsw-standalone-shell .surface-card h2 {
    margin-top: 0;
    color: var(--text-headings);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.fsw-standalone-shell .surface-card p {
    color: var(--text-muted);
    font-size: var(--font-size-base);
    line-height: 1.5;
}

/* ==========================================================================
   Login / Account Surface Styles
   ========================================================================== */

.fsw-standalone-shell .account-surface {
    max-width: 64rem;
    margin: 0 auto;
}

.fsw-standalone-shell .account-surface.account-login {
    max-width: 32rem;
    padding-top: 2rem;
}

.fsw-standalone-shell .account-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.fsw-standalone-shell .account-form label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-main);
}

.fsw-standalone-shell .account-error {
    color: var(--status-error-text);
    background: var(--status-error-bg);
    border: 1px solid var(--status-error-border);
    padding: 0.75rem 1rem;
    border-radius: var(--control-radius);
    font-size: var(--font-size-sm);
    margin-bottom: 1rem;
}

.fsw-standalone-shell .account-note {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: 1.5rem;
    line-height: 1.5;
}

.fsw-standalone-shell .account-note a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.fsw-standalone-shell .demo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--control-radius);
    padding: 1.25rem;
    margin-top: 1.25rem;
    box-shadow: var(--card-shadow);
}

.fsw-standalone-shell .demo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.fsw-standalone-shell .demo-pill-badge {
    background: var(--brand-primary);
    color: var(--brand-primary-text);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

.fsw-standalone-shell .demo-quota-badge {
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

.fsw-standalone-shell .demo-desc {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0 0 1rem 0;
    line-height: 1.45;
}

.fsw-standalone-shell .demo-form {
    margin-bottom: 0.75rem;
}

.fsw-standalone-shell .demo-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    background: var(--brand-primary);
    color: var(--brand-primary-text);
    border: none;
    border-radius: var(--control-radius);
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.fsw-standalone-shell .demo-btn:hover {
    background: var(--brand-primary-hover);
}

.fsw-standalone-shell .demo-btn:active {
    background: var(--brand-primary-active);
    transform: translateY(1px);
}

.fsw-standalone-shell .demo-credentials-toggle {
    margin-top: 0.5rem;
    font-size: var(--font-size-xs);
    color: var(--text-dim);
}

.fsw-standalone-shell .demo-credentials-toggle summary {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    color: var(--brand-primary);
    font-weight: 500;
}

.fsw-standalone-shell .demo-credentials-toggle summary:hover {
    text-decoration: underline;
}

.fsw-standalone-shell .demo-credentials-box {
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-surface-subtle);
    border-radius: 0.35rem;
    border: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fsw-standalone-shell .demo-cred-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fsw-standalone-shell .demo-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 4.5rem;
}

.fsw-standalone-shell .demo-cred-row code {
    font-family: ui-monospace, monospace;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    color: var(--text-main);
    font-size: var(--font-size-xs);
}

.fsw-standalone-shell .login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-dim);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fsw-standalone-shell .login-separator::before,
.fsw-standalone-shell .login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.fsw-standalone-shell .login-separator span {
    padding: 0 0.75rem;
}

/* ==========================================================================
   Spaces View & Space Tiles
   ========================================================================== */

.fsw-standalone-shell .spaces-surface {
    max-width: 72rem;
    margin: 0 auto;
}

.fsw-standalone-shell .spaces-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.fsw-standalone-shell .spaces-header h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-headings);
}

.fsw-standalone-shell .subtitle,
.fsw-standalone-shell .spaces-header p.lead {
    font-size: var(--font-size-base);
    line-height: 1.5;
    max-width: 44rem;
    margin: 0;
    color: var(--text-muted);
}

.fsw-standalone-shell .header-action {
    display: flex;
    align-items: center;
}

.fsw-standalone-shell .create-space-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    min-height: var(--control-height);
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--control-radius);
}

/* Spaces Tiles Grid */
.fsw-standalone-shell .spaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Individual Space Tile */
.fsw-standalone-shell .space-tile {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
}

.fsw-standalone-shell .space-tile:hover {
    transform: translateY(-3px);
    border-color: var(--brand-primary);
    box-shadow: var(--elevated-shadow);
    text-decoration: none;
}

.fsw-standalone-shell .space-tile-header,
.fsw-standalone-shell .tile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.fsw-standalone-shell .space-tile-icon,
.fsw-standalone-shell .tile-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--control-radius);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.fsw-standalone-shell .space-tile-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fsw-standalone-shell .space-tile-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fsw-standalone-shell .space-tile-title,
.fsw-standalone-shell .tile-title {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-headings);
    transition: color 0.15s ease;
}

.fsw-standalone-shell .space-tile:hover .space-tile-title {
    color: var(--brand-primary);
}

.fsw-standalone-shell .space-tile-kind {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.fsw-standalone-shell .space-tile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 0.85rem;
    font-size: var(--font-size-sm);
}

.fsw-standalone-shell .space-tile-date {
    color: var(--text-dim);
    font-size: var(--font-size-xs);
}

.fsw-standalone-shell .space-tile-action {
    color: var(--brand-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.15s ease;
}

.fsw-standalone-shell .space-tile:hover .space-tile-action {
    transform: translateX(3px);
}

/* "Create New Space" Tile */
.fsw-standalone-shell .create-space-tile {
    background: var(--bg-surface-subtle);
    border: 2px dashed var(--border-strong);
    padding: 0;
    min-height: 12rem;
}

.fsw-standalone-shell .create-space-tile:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
}

.fsw-standalone-shell .create-tile-btn {
    width: 100%;
    height: 100%;
    padding: 1.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font: inherit;
    color: inherit;
}

.fsw-standalone-shell .create-icon-badge {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--brand-primary);
    margin-bottom: 0.85rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.fsw-standalone-shell .create-space-tile:hover .create-icon-badge {
    transform: scale(1.08);
    background: var(--brand-primary);
    color: var(--brand-primary-text);
}

.fsw-standalone-shell .create-tile-title {
    margin: 0 0 0.35rem;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-headings);
}

.fsw-standalone-shell .create-tile-desc {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 16rem;
}

/* Badges */
.fsw-standalone-shell .badge,
.fsw-standalone-shell .state-badge {
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    display: inline-block;
}

.fsw-standalone-shell .badge-success,
.fsw-standalone-shell .state-badge.ready {
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
    color: var(--status-success-text);
}

.fsw-standalone-shell .badge-warning,
.fsw-standalone-shell .state-badge.pending {
    background: var(--status-warning-bg);
    border: 1px solid var(--status-warning-border);
    color: var(--status-warning-text);
}

.fsw-standalone-shell .badge-neutral,
.fsw-standalone-shell .role-pill {
    background: var(--status-neutral-bg);
    color: var(--status-neutral-text);
}

/* ==========================================================================
   Space Detail Surface
   ========================================================================== */

.fsw-standalone-shell .space-detail-surface,
.fsw-standalone-shell .space-detail {
    max-width: 72rem;
    margin: 0 auto;
}

.fsw-standalone-shell .breadcrumb,
.fsw-standalone-shell .back-link {
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.fsw-standalone-shell .breadcrumb-link:hover,
.fsw-standalone-shell .back-link:hover {
    color: var(--brand-primary);
    text-decoration: none;
}

.fsw-standalone-shell .space-detail-header,
.fsw-standalone-shell .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.fsw-standalone-shell .space-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fsw-standalone-shell .space-icon-badge {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--control-radius);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--card-shadow);
    flex-shrink: 0;
}

.fsw-standalone-shell .space-display-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-headings);
    margin: 0;
    line-height: 1.2;
}

.fsw-standalone-shell .space-header-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Detail Layout Grid */
.fsw-standalone-shell .space-layout-grid,
.fsw-standalone-shell .detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 960px) {

    .fsw-standalone-shell .space-layout-grid,
    .fsw-standalone-shell .detail-layout {
        grid-template-columns: 1fr;
    }
}

.fsw-standalone-shell .space-main-col,
.fsw-standalone-shell .space-side-col,
.fsw-standalone-shell .detail-main,
.fsw-standalone-shell .detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

/* Upload Drop Zone */
.fsw-standalone-shell .upload-drop-zone {
    background: var(--bg-surface-subtle);
    border: 2px dashed var(--border-strong);
    border-radius: var(--control-radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.fsw-standalone-shell .upload-drop-zone:hover {
    background: var(--bg-surface-hover);
    border-color: var(--brand-primary);
}

.fsw-standalone-shell .file-input-overlay,
.fsw-standalone-shell .upload-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.fsw-standalone-shell .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.fsw-standalone-shell .upload-prompt {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-headings);
}

/* Folder Breadcrumbs & Items */
.fsw-standalone-shell .folder-breadcrumbs,
.fsw-standalone-shell .breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--control-radius);
    margin-bottom: 1.25rem;
    font-size: var(--font-size-sm);
}

.fsw-standalone-shell .crumb-btn,
.fsw-standalone-shell .breadcrumb-link {
    background: transparent;
    border: none;
    color: var(--brand-primary);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.15s ease;
}

.fsw-standalone-shell .crumb-btn:hover,
.fsw-standalone-shell .breadcrumb-link:hover {
    background: var(--bg-surface-hover);
    text-decoration: underline;
}

.fsw-standalone-shell .crumb-sep,
.fsw-standalone-shell .breadcrumb-sep {
    color: var(--text-dim);
    -webkit-user-select: none;
    user-select: none;
}

.fsw-standalone-shell .folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--control-radius);
    margin-bottom: 0.5rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fsw-standalone-shell .folder-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
}

.fsw-standalone-shell .folder-row-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: transparent;
    border: none;
    color: var(--text-headings);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-align: left;
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0;
    font-family: inherit;
}

.fsw-standalone-shell .object-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--control-radius);
    margin-bottom: 0.5rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fsw-standalone-shell .object-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
}

.fsw-standalone-shell .object-name {
    font-family: ui-monospace, monospace;
    font-size: var(--font-size-base);
    font-weight: 600;
    word-break: break-all;
    color: var(--text-headings);
}

.fsw-standalone-shell .object-meta {
    font-size: var(--font-size-sm);
    color: var(--text-dim);
}

/* Tables */
.fsw-standalone-shell .files-table,
.fsw-standalone-shell .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    text-align: left;
}

.fsw-standalone-shell .files-table th,
.fsw-standalone-shell .data-table th {
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
}

.fsw-standalone-shell .files-table td,
.fsw-standalone-shell .data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.fsw-standalone-shell .files-table tr:hover,
.fsw-standalone-shell .data-table tr:hover {
    background: var(--bg-surface-hover);
}

/* Members List */
.fsw-standalone-shell .member-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.fsw-standalone-shell .member-item,
.fsw-standalone-shell .member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--control-radius);
    flex-wrap: wrap;
}

/* ==========================================================================
   Management & Provisioning Surface Styles
   ========================================================================== */

.fsw-standalone-shell .management-surface,
.fsw-standalone-shell .provisioning-surface {
    max-width: 64rem;
    margin: 0 auto;
}

.fsw-standalone-shell .management-header,
.fsw-standalone-shell .provisioning-header,
.fsw-standalone-shell .mgmt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.fsw-standalone-shell .management-tabs,
.fsw-standalone-shell .mgmt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--line);
}

.fsw-standalone-shell .tab-button,
.fsw-standalone-shell .mgmt-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease-in-out;
}

.fsw-standalone-shell .tab-button:hover,
.fsw-standalone-shell .mgmt-tab:hover {
    color: var(--text-headings);
}

.fsw-standalone-shell .tab-button.active,
.fsw-standalone-shell .mgmt-tab.active {
    color: var(--text-headings);
    border-bottom-color: var(--brand-primary);
}

.fsw-standalone-shell .section-grid,
.fsw-standalone-shell .mgmt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 1.5rem;
}

.fsw-standalone-shell .prop-list,
.fsw-standalone-shell .property-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.fsw-standalone-shell .prop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-subtle);
    padding-bottom: 0.4rem;
    font-size: var(--font-size-sm);
}

.fsw-standalone-shell .prop-row dt {
    color: var(--text-muted);
}

.fsw-standalone-shell .prop-row dd {
    margin: 0;
    font-weight: 600;
    color: var(--text-headings);
}

/* Modals */
.fsw-standalone-shell .modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    padding: 1.5rem !important;
    opacity: 1 !important;
}

.fsw-standalone-shell .modal-dialog {
    position: relative !important;
    max-width: 34rem !important;
    width: 100% !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    padding: 1.75rem !important;
    box-shadow: var(--elevated-shadow) !important;
    display: grid !important;
    gap: 0.85rem !important;
    pointer-events: auto !important; /* CRITICAL: Bootstrap 5 defines .modal-dialog { pointer-events: none; } which causes clicks to pass right through to the backdrop */
    z-index: 10001 !important;
}

.fsw-standalone-shell .modal-dialog * {
    pointer-events: auto !important;
}

.fsw-standalone-shell .modal-dialog h2,
.fsw-standalone-shell .modal-dialog h3 {
    margin: 0;
    font-size: var(--font-size-lg, 1.25rem);
    font-weight: 700;
    color: var(--text-headings);
}

.fsw-standalone-shell .modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
}

.fsw-standalone-shell .modal-actions,
.fsw-standalone-shell .modal-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Modal Form Controls */
.fsw-standalone-shell .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.fsw-standalone-shell .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.fsw-standalone-shell .form-row label {
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    color: var(--text-muted);
}

.fsw-standalone-shell .form-input {
    width: 100%;
    min-height: var(--control-height, 2.5rem);
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--input-border, var(--border-color));
    border-radius: var(--control-radius, 0.5rem);
    background: var(--input-bg, var(--bg-surface));
    color: var(--input-text, var(--text-main));
    font: inherit;
    font-size: var(--font-size-base, 1rem);
    box-sizing: border-box;
    display: block;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fsw-standalone-shell .form-input:focus {
    border-color: var(--input-focus-border, var(--brand-primary));
    box-shadow: 0 0 0 2px var(--input-focus-ring, rgba(37, 99, 235, 0.2));
    outline: none;
}

.fsw-standalone-shell .checkbox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.fsw-standalone-shell .checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--text-main);
}

.fsw-standalone-shell .btn-primary,
.fsw-standalone-shell .btn-primary-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--brand-primary);
    color: var(--brand-primary-text, #ffffff);
    border: 1px solid var(--brand-primary);
    border-radius: var(--control-radius, 6px);
    font: inherit;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.fsw-standalone-shell .btn-primary:hover:not(:disabled),
.fsw-standalone-shell .btn-primary-sm:hover:not(:disabled) {
    background: var(--brand-primary-hover);
}

.fsw-standalone-shell .btn-secondary,
.fsw-standalone-shell .btn-secondary-sm,
.fsw-standalone-shell .btn-secondary-Action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    background: var(--btn-secondary-bg, var(--bg-surface));
    color: var(--btn-secondary-text, var(--text-main));
    border: 1px solid var(--btn-secondary-border, var(--border-color));
    border-radius: var(--control-radius, 6px);
    font: inherit;
    font-size: var(--font-size-sm, 0.85rem);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fsw-standalone-shell .btn-secondary:hover:not(:disabled),
.fsw-standalone-shell .btn-secondary-sm:hover:not(:disabled),
.fsw-standalone-shell .btn-secondary-Action:hover:not(:disabled) {
    background: var(--btn-secondary-hover-bg, var(--bg-surface-subtle));
    border-color: var(--btn-secondary-hover-border, var(--border-strong));
    color: var(--btn-secondary-hover-text, var(--text-headings));
}

.fsw-standalone-shell .btn-danger-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    background: var(--status-error-bg, #fef2f2);
    color: var(--status-error-text, #991b1b);
    border: 1px solid var(--status-error-border, #fecaca);
    border-radius: var(--control-radius, 6px);
    font: inherit;
    font-size: var(--font-size-sm, 0.85rem);
    font-weight: 600;
    cursor: pointer;
}

.fsw-standalone-shell .btn-danger-sm:hover:not(:disabled) {
    background: var(--status-error-text, #991b1b);
    color: #ffffff;
}

@media (max-width: 56rem) {
    .fsw-standalone-shell .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinners */
.fsw-standalone-shell .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1rem;
    color: var(--text-dim);
}

.fsw-standalone-shell .spinner {
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: fsw-spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

/* ==========================================================================
   Account Profile & API Tokens Styles
   ========================================================================== */

.fsw-standalone-shell .account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.fsw-standalone-shell .account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 1.5rem;
}

.fsw-standalone-shell .surface-card.full-width {
    grid-column: 1 / -1;
}

.fsw-standalone-shell .meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1.25rem;
    margin: 0;
}

.fsw-standalone-shell .meta-grid dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.fsw-standalone-shell .meta-grid dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-main);
}

.fsw-standalone-shell .stat-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.fsw-standalone-shell .stat-card {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fsw-standalone-shell .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-headings);
    line-height: 1.2;
}

.fsw-standalone-shell .stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.fsw-standalone-shell .stat-success .stat-number {
    color: #059669;
}

.fsw-standalone-shell .stat-warning .stat-number {
    color: #d97706;
}

.fsw-standalone-shell .status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.fsw-standalone-shell .table-container {
    overflow-x: auto;
    margin-top: 0.5rem;
}

.fsw-standalone-shell .space-title-link {
    color: var(--text-headings);
    text-decoration: none;
}

.fsw-standalone-shell .space-title-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.fsw-standalone-shell .table-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.fsw-standalone-shell .table-action-btn:hover {
    background: var(--btn-neutral-bg);
    color: var(--btn-neutral-text);
    border-color: var(--btn-neutral-bg);
}

.fsw-standalone-shell .shortcuts-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.fsw-standalone-shell .shortcut-card {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.fsw-standalone-shell .shortcut-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

.fsw-standalone-shell .shortcut-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-headings);
}

.fsw-standalone-shell .shortcut-card p {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.fsw-standalone-shell .tokens-card {
    margin-top: 1.5rem;
}

.fsw-standalone-shell .empty-tokens {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-surface-subtle);
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.fsw-standalone-shell .empty-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.fsw-standalone-shell .empty-tokens h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-headings);
    font-size: 1.15rem;
}

.fsw-standalone-shell .empty-tokens p {
    margin: 0 0 1.25rem 0;
    color: var(--text-muted);
    max-width: 26rem;
    font-size: 0.95rem;
}

.fsw-standalone-shell .badge-pat {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.fsw-standalone-shell .badge-sat {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.fsw-standalone-shell .token-prefix {
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    padding: 0.2rem 0.45rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 0.3rem;
    color: var(--text-main);
}

.fsw-standalone-shell .button-danger-sm {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    padding: 0.25rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fsw-standalone-shell .button-danger-sm:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

.fsw-standalone-shell .sdk-tip-card {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

.fsw-standalone-shell .sdk-tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-headings);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.fsw-standalone-shell .sdk-code-snippet {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.85rem 1rem;
    border-radius: 0.375rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.825rem;
    overflow-x: auto;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fsw-standalone-shell .token-reveal-box {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.fsw-standalone-shell .raw-token-text {
    flex: 1;
    font-family: var(--font-mono, monospace);
    font-size: 0.95rem;
    color: #38bdf8;
    word-break: break-all;
    -webkit-user-select: all;
    user-select: all;
}

.fsw-standalone-shell .button-copy {
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 0.85rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fsw-standalone-shell .button-copy:hover {
    filter: brightness(1.1);
}

.fsw-standalone-shell .button-copy.copied {
    background: #10b981;
}

.fsw-standalone-shell .button-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fsw-standalone-shell .button-danger:hover {
    background: #dc2626;
}