:root {
    --sage-primary: #2563eb;
    --sage-secondary: #10b981;
    --sage-warning: #f59e0b;
    --sage-danger: #ef4444;
    --sage-bg: #f9fafb;
    --sage-card: #ffffff;
    --sage-text: #111827;
    --sage-text-muted: #6b7280;
    --sage-border: #e5e7eb;
    --sage-sidebar: #0f172a;
    --sage-sidebar-text: #e5eefb;
    --sage-sidebar-muted: #94a3b8;
    --sage-sidebar-link: #cbd5e1;
    --sage-sidebar-link-active: rgba(255, 255, 255, 0.08);
    --sage-surface-alt: #f8fafc;
    --sage-body-bg: linear-gradient(180deg, #f8fbff 0%, #f9fafb 100%);
    --sage-panel-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
    --sage-input-border: #dbe1ea;
    --sage-primary-hover: #1d4ed8;
    --sage-summary-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    --sage-summary-border: rgba(37, 99, 235, 0.08);
    --sage-chip-bg: rgba(37, 99, 235, 0.08);
    --sage-surface-glow: radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 42%);
    --sage-panel-shadow-strong: 0 22px 60px rgba(15, 23, 42, 0.09);
    --sage-soft-highlight: rgba(255, 255, 255, 0.72);
}

body[data-theme="slate-dark"] {
    --sage-primary: #60a5fa;
    --sage-secondary: #34d399;
    --sage-warning: #fbbf24;
    --sage-danger: #f87171;
    --sage-bg: #0b1220;
    --sage-card: #111827;
    --sage-text: #e5e7eb;
    --sage-text-muted: #94a3b8;
    --sage-border: #243041;
    --sage-sidebar: #020617;
    --sage-sidebar-text: #dbeafe;
    --sage-sidebar-muted: #94a3b8;
    --sage-sidebar-link: #cbd5e1;
    --sage-sidebar-link-active: rgba(96, 165, 250, 0.18);
    --sage-surface-alt: #0f172a;
    --sage-body-bg: linear-gradient(180deg, #08111f 0%, #0b1220 100%);
    --sage-panel-shadow: 0 18px 44px rgba(2, 6, 23, 0.38);
    --sage-input-border: #334155;
    --sage-primary-hover: #3b82f6;
    --sage-summary-bg: linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(52, 211, 153, 0.12));
    --sage-summary-border: rgba(96, 165, 250, 0.2);
    --sage-chip-bg: rgba(96, 165, 250, 0.14);
}

body[data-theme="emerald-light"] {
    --sage-primary: #059669;
    --sage-secondary: #0f766e;
    --sage-warning: #d97706;
    --sage-danger: #dc2626;
    --sage-bg: #f6fbf9;
    --sage-card: #ffffff;
    --sage-text: #0f172a;
    --sage-text-muted: #64748b;
    --sage-border: #d8e7e0;
    --sage-sidebar: #064e3b;
    --sage-sidebar-text: #ecfdf5;
    --sage-sidebar-muted: #a7f3d0;
    --sage-sidebar-link: #d1fae5;
    --sage-sidebar-link-active: rgba(255, 255, 255, 0.12);
    --sage-surface-alt: #f0fdf4;
    --sage-body-bg: linear-gradient(180deg, #f3fbf7 0%, #f6fbf9 100%);
    --sage-panel-shadow: 0 14px 40px rgba(6, 78, 59, 0.08);
    --sage-input-border: #c8ddd4;
    --sage-primary-hover: #047857;
    --sage-summary-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.09), rgba(15, 118, 110, 0.08));
    --sage-summary-border: rgba(5, 150, 105, 0.12);
    --sage-chip-bg: rgba(5, 150, 105, 0.08);
}

body[data-theme="navy-gold"] {
    --sage-primary: #173a7a;
    --sage-secondary: #ffb400;
    --sage-warning: #f59e0b;
    --sage-danger: #dc2626;
    --sage-bg: #f8fafc;
    --sage-card: #ffffff;
    --sage-text: #0f172a;
    --sage-text-muted: #64748b;
    --sage-border: #d6ddeb;
    --sage-sidebar: #173a7a;
    --sage-sidebar-text: #eff4ff;
    --sage-sidebar-muted: #bfd0f5;
    --sage-sidebar-link: #d9e5ff;
    --sage-sidebar-link-active: rgba(255, 255, 255, 0.14);
    --sage-surface-alt: #f3f6fb;
    --sage-body-bg: linear-gradient(180deg, #f9fbff 0%, #f5f7fb 100%);
    --sage-panel-shadow: 0 16px 42px rgba(23, 58, 122, 0.08);
    --sage-input-border: #cbd6ea;
    --sage-primary-hover: #122f63;
    --sage-summary-bg: linear-gradient(135deg, rgba(23, 58, 122, 0.08), rgba(255, 180, 0, 0.12));
    --sage-summary-border: rgba(23, 58, 122, 0.12);
    --sage-chip-bg: rgba(23, 58, 122, 0.08);
    --sage-surface-glow: radial-gradient(circle at top left, rgba(23, 58, 122, 0.18), transparent 42%);
}

body[data-theme="navy-gold"] .brand-badge {
    background: linear-gradient(135deg, #173a7a, #ffb400);
}

body[data-theme="navy-gold"] .metric-card::before {
    background: linear-gradient(90deg, #173a7a, #ffb400);
}

body[data-theme="navy-gold"] .section-kicker,
body[data-theme="navy-gold"] .team-form-section-kicker {
    color: #b77900;
}

body[data-theme="navy-gold"] .app-chip {
    background: linear-gradient(135deg, rgba(23, 58, 122, 0.08), rgba(255, 180, 0, 0.18));
    color: #173a7a;
    border: 1px solid rgba(255, 180, 0, 0.22);
}

body[data-theme="navy-gold"] .profile-tabs .nav-link.active {
    background: linear-gradient(135deg, #173a7a, #2956aa);
    border-color: #173a7a;
    box-shadow: inset 0 0 0 1px rgba(255, 180, 0, 0.18);
}

body[data-theme="navy-gold"] .btn-primary {
    background: linear-gradient(135deg, #173a7a, #2a58b0);
    border-color: #173a7a;
    box-shadow: 0 12px 26px rgba(23, 58, 122, 0.16);
}

body[data-theme="navy-gold"] .btn-primary:hover,
body[data-theme="navy-gold"] .btn-primary:focus,
body[data-theme="navy-gold"] .btn-primary:active {
    background: linear-gradient(135deg, #122f63, #173a7a);
    border-color: #122f63;
}

body[data-theme="navy-gold"] .btn-outline-primary {
    color: #173a7a;
    border-color: rgba(23, 58, 122, 0.22);
}

body[data-theme="navy-gold"] .btn-outline-primary:hover,
body[data-theme="navy-gold"] .btn-outline-primary:focus {
    background: rgba(255, 180, 0, 0.14);
    border-color: rgba(255, 180, 0, 0.38);
    color: #173a7a;
}

body[data-theme="navy-gold"] .summary-strip {
    background: linear-gradient(135deg, rgba(23, 58, 122, 0.08), rgba(255, 180, 0, 0.16));
    border-color: rgba(255, 180, 0, 0.18);
}

body[data-theme="navy-gold"] .summary-box {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 92%, transparent 8%) 0%, var(--sage-card) 100%),
        linear-gradient(135deg, rgba(23, 58, 122, 0.04), rgba(255, 180, 0, 0.08));
}

body[data-theme="navy-gold"] .notification-badge {
    background: linear-gradient(135deg, #ffb400, #f59e0b);
    color: #173a7a;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.26);
}

body[data-theme="navy-gold"] .notification-meta-dot {
    background: #ffb400;
    box-shadow: 0 0 0 4px rgba(255, 180, 0, 0.14);
}

body[data-theme="navy-gold"] .pipeline-item:hover {
    border-color: rgba(255, 180, 0, 0.38);
    box-shadow: 0 16px 34px rgba(23, 58, 122, 0.08);
}

body[data-theme="navy-gold"] .timeline-dot {
    background: #ffb400;
    box-shadow: 0 0 0 4px rgba(255, 180, 0, 0.14);
}

body {
    background: var(--sage-body-bg);
    color: var(--sage-text);
    font-family: "Inter", "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.guest-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.mobile-drawer-overlay,
.mobile-header,
.sidebar-mobile-top,
.sidebar-close,
.mobile-menu-toggle {
    display: none;
}

.sidebar {
    background: linear-gradient(180deg, var(--sage-sidebar) 0%, color-mix(in srgb, var(--sage-sidebar) 78%, #111827 22%) 100%);
    color: var(--sage-sidebar-text);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 0;
    min-height: 100vh;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

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

.brand--logo-only {
    justify-content: center;
    padding-block: 6px 2px;
}

.brand-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #10b981);
    color: #fff;
    font-weight: 700;
}

.brand-mark {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.brand--logo-only .brand-mark {
    width: min(100%, 220px);
    min-width: 0;
    max-width: 220px;
    height: auto;
    min-height: 72px;
    max-height: 112px;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

.brand-logo {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.96);
    padding: 6px;
    border-radius: 14px;
    flex-shrink: 0;
}

.brand--logo-only .brand-logo {
    height: auto !important;
    max-height: 112px !important;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--sage-sidebar-text);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-subtitle {
    font-size: 0.82rem;
    color: var(--sage-sidebar-muted);
    line-height: 1.15;
}

.app-brand-preview-frame {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
    box-shadow: var(--sage-panel-shadow);
}

.app-brand-preview-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 8px;
}

.sidebar-link {
    color: var(--sage-sidebar-link);
    border-radius: 16px;
    padding: 13px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.18s ease;
}

.sidebar-link i {
    margin-right: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--sage-sidebar-link-active);
    color: var(--sage-sidebar-text);
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sidebar-footer {
    border-top: 1px solid color-mix(in srgb, var(--sage-sidebar-muted) 22%, transparent 78%);
    padding-top: 20px;
    margin-top: auto;
    min-width: 0;
}

.content-area {
    padding: 28px 28px 42px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 25%),
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.045), transparent 18%),
        var(--sage-body-bg);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
    padding: 22px 24px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 88%, transparent 12%);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 82%, transparent 18%) 0%, var(--sage-card) 100%),
        var(--sage-surface-glow);
    box-shadow: var(--sage-panel-shadow);
    position: relative;
    overflow: visible;
}

.topbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 42%);
    pointer-events: none;
    z-index: 0;
}

.topbar > * {
    position: relative;
    z-index: 1;
}

.page-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
    line-height: 0.96;
}

.page-subtitle {
    color: var(--sage-text-muted);
    font-size: 1.04rem;
    max-width: 760px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.topbar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.topbar-copy {
    min-width: 0;
}

.notification-dropdown {
    position: relative;
    z-index: 20;
}

.notification-trigger {
    position: relative;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--sage-text);
    box-shadow: none;
}

.notification-trigger i {
    font-size: 1.34rem;
    color: var(--sage-text);
}

.notification-trigger:hover,
.notification-trigger:focus,
.notification-trigger.show {
    background: rgba(15, 23, 42, 0.05);
    color: var(--sage-text);
    box-shadow: none;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -12px;
    min-width: 34px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border: 2px solid #fff;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.notification-menu {
    --bs-dropdown-min-width: 28rem;
    width: min(28rem, calc(100vw - 24px)) !important;
    min-width: min(28rem, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px);
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    border-radius: 16px;
    overflow: hidden;
    background: var(--sage-card);
    box-shadow: var(--sage-panel-shadow-strong);
    padding: 0 !important;
    z-index: 1080;
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
}

.notification-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: #eef3fd;
    border-bottom: 1px solid color-mix(in srgb, var(--sage-border) 88%, transparent 12%);
}

.notification-menu-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--sage-text);
}

.notification-view-link {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--sage-primary);
    text-decoration: none;
}

.notification-feed {
    display: flex;
    flex-direction: column;
    max-height: 540px;
    overflow-y: auto;
    background: var(--sage-card);
    overscroll-behavior: contain;
}

.notification-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
    padding: 18px;
    border-radius: 0;
    text-decoration: none;
    color: var(--sage-text);
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 94%, transparent 6%);
    transition: background 0.18s ease;
    width: 100%;
    box-sizing: border-box;
    background: var(--sage-card);
}

.notification-item:hover {
    background: color-mix(in srgb, var(--sage-primary) 5%, #ffffff 95%);
}

.notification-item,
.notification-item:visited,
.notification-item:hover,
.notification-item:active,
.notification-item:focus {
    text-decoration: none !important;
    color: var(--sage-text) !important;
}

.notification-feed .notification-item:first-child {
    border-top: 0;
}

.notification-avatar {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e7efff, #f8fbff);
    color: #5b82f6;
    font-size: 1.02rem;
}

.notification-avatar-task {
    background: linear-gradient(135deg, #e7efff, #f7faff);
    color: #4f7cf0;
}

.notification-avatar-commission {
    background: linear-gradient(135deg, #fff3d8, #fff8ea);
    color: #d97706;
}

.notification-avatar-activity {
    background: linear-gradient(135deg, #e8f7ef, #f4fbf7);
    color: #10b981;
}

.notification-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
    padding-top: 1px;
    overflow: hidden;
}

.notification-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--sage-text) !important;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
    word-break: normal;
    overflow-wrap: break-word;
}

.notification-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

.notification-meta-dot {
    width: 12px;
    min-width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #5b82f6;
    box-shadow: 0 0 0 4px rgba(91, 130, 246, 0.12);
}

.notification-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 0.84rem;
    color: var(--sage-text-muted) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-meta-pill i {
    color: #7b8aa5;
}

.notification-empty {
    padding: 22px 18px;
    font-size: 0.9rem;
    color: var(--sage-text-muted);
}

.notification-menu a,
.notification-menu a:visited,
.notification-menu a:hover,
.notification-menu a:focus,
.notification-menu a:active {
    color: inherit !important;
    text-decoration: none !important;
}

.topbar-theme-form {
    min-width: 240px;
}

.metric-card,
.task-card,
.summary-box,
.install-panel {
    background: var(--sage-card);
    border: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
    border-radius: 24px;
    box-shadow: var(--sage-panel-shadow);
}

.metric-card {
    padding: 24px;
    min-height: 184px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 92%, transparent 8%) 0%, var(--sage-card) 100%),
        var(--sage-surface-glow);
    box-shadow: var(--sage-panel-shadow-strong);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--sage-primary), rgba(16, 185, 129, 0.62));
    opacity: 0.9;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    font-size: 1.18rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.metric-label {
    color: var(--sage-text-muted);
    font-size: 0.82rem;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 700;
}

.metric-value {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: clamp(2rem, 2vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

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

.pipeline-item {
    border: 1px solid var(--sage-border);
    border-radius: 20px;
    padding: 18px 18px 20px;
    background: linear-gradient(180deg, var(--sage-card) 0%, color-mix(in srgb, var(--sage-surface-alt) 78%, transparent 22%) 100%);
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.pipeline-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--sage-panel-shadow);
    border-color: color-mix(in srgb, var(--sage-primary) 26%, var(--sage-border) 74%);
}

.pipeline-stage {
    font-size: 0.9rem;
    color: var(--sage-text-muted);
    margin-bottom: 12px;
}

.pipeline-total {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-tabs {
    border-bottom: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-tabs .nav-link {
    border: 1px solid var(--sage-border);
    border-radius: 999px;
    color: var(--sage-text-muted);
    font-weight: 700;
    background: var(--sage-card);
    padding: 0.85rem 1.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.profile-tabs .nav-link.active {
    background: var(--sage-primary);
    border-color: var(--sage-primary);
    color: #fff;
}

.settings-tabs {
    align-items: center;
}

.settings-pane-header {
    margin-bottom: 1rem;
}

.settings-pane-body {
    position: relative;
}

.user-form-layout {
    max-width: 1040px;
}

.team-form-section {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 94%, transparent 6%) 0%, var(--sage-surface-alt) 100%);
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.team-form-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.team-form-section-kicker {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sage-primary);
    margin-bottom: 0.3rem;
}

.team-form-section-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.team-permissions-box {
    padding: 20px;
}

.team-permissions-header {
    margin-bottom: 0;
}

.team-permissions-toggle {
    white-space: nowrap;
}

.team-permissions-content {
    margin-top: 16px;
}

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

.permission-card {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: color-mix(in srgb, var(--sage-card) 96%, transparent 4%);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.permission-card:hover {
    border-color: color-mix(in srgb, var(--sage-primary) 24%, var(--sage-border) 76%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.permission-check {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.permission-check .form-check-input {
    float: none;
    margin: 0;
}

.permission-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.permission-title {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--sage-text);
    line-height: 1.35;
}

.permission-description {
    font-size: 0.8rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
}

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

.team-form-actions .btn {
    min-height: 44px;
}

.team-user-cards {
    display: none;
}

.team-user-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--sage-card);
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    box-shadow: var(--sage-panel-shadow);
}

.team-user-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.team-user-name {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.team-user-email {
    font-size: 0.84rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.team-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.team-user-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--sage-text-muted);
}

.team-user-meta-label {
    font-weight: 700;
    color: var(--sage-text);
    margin-right: 4px;
}

.team-user-permissions-preview {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--sage-text-muted);
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
}

.team-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.team-user-actions form {
    margin: 0;
}

.team-user-actions .btn {
    min-height: 40px;
}

.students-filter-toggle {
    display: none;
}

.students-mobile-list {
    display: none;
}

.students-mobile-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--sage-card);
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    box-shadow: var(--sage-panel-shadow);
}

.students-mobile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.students-mobile-name {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.students-mobile-email {
    font-size: 0.82rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.students-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.students-mobile-meta {
    font-size: 0.84rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
}

.students-mobile-meta-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sage-text);
    margin-bottom: 3px;
}

.students-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
}

.students-mobile-actions form {
    margin: 0;
}

.students-mobile-actions .btn {
    min-height: 40px;
}

.students-empty-card {
    padding: 24px 18px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 96%, transparent 4%) 0%, var(--sage-surface-alt) 100%);
    box-shadow: var(--sage-panel-shadow);
    text-align: center;
}

.students-empty-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.students-empty-copy {
    font-size: 0.86rem;
    color: var(--sage-text-muted);
    line-height: 1.5;
}

.tasks-filter-toggle,
.tasks-create-toggle {
    display: none;
}

.tasks-mobile-list {
    display: none;
}

.tasks-mobile-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--sage-card);
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    box-shadow: var(--sage-panel-shadow);
}

.tasks-mobile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tasks-mobile-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.tasks-mobile-student {
    font-size: 0.84rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
    margin-top: 4px;
}

.tasks-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.tasks-mobile-description {
    font-size: 0.82rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
}

.tasks-mobile-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.tasks-mobile-meta {
    font-size: 0.83rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
}

.tasks-mobile-meta-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sage-text);
    margin-bottom: 3px;
}

.tasks-mobile-overdue {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--sage-danger);
}

.tasks-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
}

.tasks-mobile-actions form {
    margin: 0;
}

.tasks-mobile-status-form {
    flex: 1 1 180px;
}

.tasks-mobile-actions .btn,
.tasks-mobile-actions .form-select {
    min-height: 40px;
}

.tasks-empty-card {
    padding: 24px 18px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 96%, transparent 4%) 0%, var(--sage-surface-alt) 100%);
    box-shadow: var(--sage-panel-shadow);
    text-align: center;
}

.tasks-empty-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.tasks-empty-copy {
    font-size: 0.86rem;
    color: var(--sage-text-muted);
    line-height: 1.5;
}

.reports-mobile-shell {
    display: none;
}

.reports-mobile-section {
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: var(--sage-card);
    box-shadow: var(--sage-panel-shadow);
    overflow: hidden;
}

.reports-mobile-section + .reports-mobile-section {
    margin-top: 12px;
}

.reports-mobile-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--sage-text);
}

.reports-mobile-section-toggle i {
    transition: transform 0.2s ease;
}

.reports-mobile-section.is-open .reports-mobile-section-toggle i {
    transform: rotate(180deg);
}

.reports-mobile-section-content {
    display: none;
    padding: 0 16px 16px;
}

.reports-mobile-section.is-open .reports-mobile-section-content {
    display: block;
}

.reports-mobile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.reports-mobile-metric-card,
.reports-mobile-detail-card,
.reports-mobile-chart-card,
.reports-mobile-empty-card {
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 96%, transparent 4%) 0%, var(--sage-surface-alt) 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.reports-mobile-metric-card {
    min-height: 100px;
    padding: 14px;
}

.reports-mobile-metric-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--sage-text-muted);
    margin-bottom: 10px;
    line-height: 1.35;
}

.reports-mobile-metric-value {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.reports-mobile-metric-meta {
    font-size: 0.78rem;
    color: var(--sage-text-muted);
    margin-top: 8px;
}

.reports-mobile-more-stats {
    margin-top: 12px;
}

.reports-mobile-subtoggle {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    border-radius: 14px;
}

.reports-mobile-more-stats-content {
    margin-top: 12px;
}

.reports-mobile-more-stats[data-mobile-collapsed="true"] .reports-mobile-more-stats-content {
    display: none;
}

.reports-mobile-card-stack {
    display: grid;
    gap: 12px;
}

.reports-mobile-detail-card {
    padding: 14px;
}

.reports-mobile-card-title,
.reports-mobile-subsection-title,
.reports-mobile-chart-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

.reports-mobile-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.86rem;
    color: var(--sage-text-muted);
    padding: 8px 0;
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
}

.reports-mobile-detail-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.reports-mobile-detail-row strong {
    color: var(--sage-text);
    font-size: 0.9rem;
}

.reports-mobile-subsection + .reports-mobile-subsection {
    margin-top: 16px;
}

.reports-mobile-chart-card {
    padding: 14px;
}

.reports-mobile-chart-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
}

.reports-mobile-chart-frame {
    min-width: 500px;
}

.reports-mobile-empty-card {
    padding: 22px 16px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--sage-text-muted);
}

.reports-desktop-only {
    display: block;
}

.mobile-table-cards {
    display: none;
}

.mobile-data-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 96%, transparent 4%) 0%, var(--sage-surface-alt) 100%);
    box-shadow: var(--sage-panel-shadow);
}

.mobile-data-card + .mobile-data-card,
.mobile-data-empty + .mobile-data-card,
.mobile-data-card + .mobile-data-empty {
    margin-top: 12px;
}

.mobile-data-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mobile-data-card-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    min-width: 0;
}

.mobile-data-card-title .small,
.mobile-data-card-title .text-secondary {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
}

.mobile-data-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.mobile-data-card-body {
    display: grid;
    gap: 8px;
}

.mobile-data-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--sage-text-muted);
    line-height: 1.45;
    padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
}

.mobile-data-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sage-text);
    min-width: 92px;
}

.mobile-data-value {
    text-align: right;
    color: var(--sage-text);
    min-width: 0;
    overflow-wrap: anywhere;
}

.mobile-data-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
}

.mobile-data-card-actions form {
    margin: 0;
}

.mobile-data-card-actions .btn,
.mobile-data-card-actions .form-select,
.mobile-data-card-actions form {
    min-height: 40px;
}

.mobile-data-empty {
    padding: 22px 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--sage-border) 92%, transparent 8%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 96%, transparent 4%) 0%, var(--sage-surface-alt) 100%);
    box-shadow: var(--sage-panel-shadow);
    text-align: center;
}

.mobile-data-empty-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.mobile-data-empty-copy {
    font-size: 0.84rem;
    color: var(--sage-text-muted);
    line-height: 1.5;
}

.mobile-collapsible-box .mobile-box-toggle {
    display: none;
}

.document-tile {
    background: linear-gradient(180deg, var(--sage-card) 0%, var(--sage-surface-alt) 100%);
    border: 1px solid var(--sage-border);
    border-radius: 16px;
    padding: 18px;
}

.documents-section {
    background: linear-gradient(180deg, var(--sage-card) 0%, color-mix(in srgb, var(--sage-surface-alt) 72%, white 28%) 100%);
    border: 1px solid var(--sage-border);
    border-radius: 20px;
    padding: 18px;
}

.documents-section + .documents-section {
    margin-top: 18px;
}

.documents-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.documents-progress-chip,
.documents-profile-note {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--sage-chip-bg);
    color: var(--sage-primary);
    font-size: 0.84rem;
    font-weight: 700;
}

.documents-checklist-table {
    margin-bottom: 0;
}

.documents-checklist-table th {
    font-size: 0.8rem;
    color: var(--sage-text-muted);
    font-weight: 700;
    border-bottom-width: 1px;
}

.documents-checklist-table td {
    vertical-align: top;
    padding-top: 14px;
    padding-bottom: 14px;
}

.documents-row-form {
    display: contents;
}

.documents-status-cell {
    min-width: 140px;
}

.documents-file-meta {
    font-size: 0.78rem;
}

.documents-action-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 110px;
}

.document-mobile-card {
    background: linear-gradient(180deg, var(--sage-card) 0%, var(--sage-surface-alt) 100%);
    border: 1px solid var(--sage-border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.documents-profile-form {
    padding: 16px;
    border: 1px solid var(--sage-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--sage-card) 70%, var(--sage-surface-alt) 30%);
}

.kanban-column {
    background: var(--sage-surface-alt);
    border: 1px solid var(--sage-border);
    border-radius: 22px;
    padding: 18px;
    height: 100%;
}

.kanban-title {
    font-weight: 700;
    margin-bottom: 16px;
}

.timeline-entry {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--sage-primary);
    margin-top: 6px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.summary-strip {
    background: var(--sage-summary-bg);
    border: 1px solid var(--sage-summary-border);
    border-radius: 16px;
    padding: 18px;
}

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

.summary-box {
    padding: 18px 18px 20px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 90%, transparent 10%) 0%, var(--sage-card) 100%),
        var(--sage-surface-glow);
}

.summary-box span {
    display: block;
    color: var(--sage-text-muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.summary-box strong {
    font-size: 1.1rem;
}

.bank-logo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--sage-border);
    background: var(--sage-card);
}

.task-status-inline {
    min-width: 130px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.calendar-heading {
    font-size: 0.85rem;
    color: var(--sage-text-muted);
    font-weight: 700;
    text-align: center;
}

.calendar-cell {
    min-height: 150px;
    background: linear-gradient(180deg, var(--sage-card) 0%, var(--sage-surface-alt) 100%);
    border: 1px solid var(--sage-border);
    border-radius: 20px;
    padding: 12px;
}

.calendar-cell-empty {
    background: transparent;
    border-style: dashed;
}

.calendar-date {
    font-weight: 700;
    margin-bottom: 10px;
}

.calendar-task {
    border-radius: 12px;
    border: 1px solid var(--sage-border);
    padding: 10px;
    background: var(--sage-card);
}

.install-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--sage-primary) 12%, transparent 88%), transparent 30%), var(--sage-body-bg);
}

.install-panel {
    padding: 32px;
}

.app-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--sage-chip-bg);
    color: var(--sage-primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.workspace-panel {
    position: relative;
    overflow: hidden;
}

.workspace-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), transparent 60%);
    pointer-events: none;
}

.filter-panel .card-body,
.data-panel .card-body,
.report-chart-panel .card-body {
    padding: 1.5rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
}

.section-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sage-primary);
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.section-title {
    font-family: "DM Sans", "Inter", sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.section-subtitle {
    color: var(--sage-text-muted);
    margin-bottom: 0;
}

.toolbar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.table-responsive {
    border-radius: 20px;
}

.table > thead.table-light > tr > th {
    background: color-mix(in srgb, var(--sage-surface-alt) 92%, transparent 8%) !important;
    color: color-mix(in srgb, var(--sage-text) 82%, var(--sage-text-muted) 18%);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    border-bottom-width: 1px;
}

.table-hover tbody tr {
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.table-hover tbody tr:hover {
    background: color-mix(in srgb, var(--sage-primary) 3%, var(--sage-card) 97%);
}

.table > :not(caption) > * > * {
    padding: 1rem;
}

.badge.text-bg-purple {
    background: #7c3aed !important;
    color: #fff !important;
}

.form-control,
.form-select {
    border-radius: 16px;
    border-color: var(--sage-input-border);
    padding: 0.9rem 1rem;
    background-color: var(--sage-card);
    color: var(--sage-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.form-control::placeholder {
    color: var(--sage-text-muted);
}

.btn {
    border-radius: 16px;
    font-weight: 700;
    padding: 0.8rem 1.15rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sage-primary), color-mix(in srgb, var(--sage-primary) 76%, #5eead4 24%));
    border-color: var(--sage-primary);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--sage-primary-hover), color-mix(in srgb, var(--sage-primary-hover) 78%, #67e8f9 22%));
    border-color: var(--sage-primary-hover);
}

.btn-light {
    background: rgba(255, 255, 255, 0.82);
    border-color: color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
    color: var(--sage-text);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-warning {
    background: rgba(255, 255, 255, 0.66);
}

.card {
    border-radius: 24px;
    background: var(--sage-card);
    color: var(--sage-text);
    box-shadow: var(--sage-panel-shadow-strong);
    overflow: hidden;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--sage-text);
    --bs-table-border-color: var(--sage-border);
}

.card-footer {
    background: color-mix(in srgb, var(--sage-surface-alt) 88%, transparent 12%);
    border-top-color: var(--sage-border);
    border-bottom-left-radius: 24px !important;
    border-bottom-right-radius: 24px !important;
}

@media (max-width: 991px) {
    .content-area {
        padding: 22px 22px 34px;
    }

    .topbar {
        padding: 18px;
    }

    .topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

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

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

@media (max-width: 575px) {
    .notification-menu {
        width: calc(100vw - 16px) !important;
        min-width: calc(100vw - 16px) !important;
    }

    .notification-item {
        padding: 16px 14px;
        column-gap: 12px;
    }

    .notification-title {
        font-size: 0.93rem;
    }

    .notification-meta-pill {
        font-size: 0.8rem;
    }
}

.table-light,
.table > thead {
    --bs-table-bg: var(--sage-surface-alt);
    --bs-table-color: var(--sage-text);
}

.alert-success {
    background: color-mix(in srgb, var(--sage-secondary) 12%, var(--sage-card) 88%);
    border-color: color-mix(in srgb, var(--sage-secondary) 22%, transparent 78%);
    color: var(--sage-text);
}

.alert-danger,
.alert-info {
    color: var(--sage-text);
}

.theme-preview {
    border: 1px solid var(--sage-border);
    border-radius: 16px;
    padding: 14px;
    background: var(--sage-card);
}

.theme-preview-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.theme-preview-strip {
    height: 56px;
    border-radius: 12px;
}

.theme-preview-sage .theme-preview-strip {
    background: linear-gradient(135deg, #2563eb, #10b981);
}

.theme-preview-slate .theme-preview-strip {
    background: linear-gradient(135deg, #60a5fa, #111827);
}

.theme-preview-emerald .theme-preview-strip {
    background: linear-gradient(135deg, #059669, #0f766e);
}

.theme-preview-navy-gold .theme-preview-strip {
    background: linear-gradient(135deg, #173a7a 0 54%, #ffb400 54% 100%);
}

@media (max-width: 1199px) {
    .pipeline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .app-shell {
        display: block;
        min-height: 100vh;
    }

    .mobile-drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.54);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.24s ease, visibility 0.24s ease;
        z-index: 1035;
    }

    body.mobile-nav-open .mobile-drawer-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(280px, calc(100vw - 40px));
        max-width: 280px;
        min-height: 100vh;
        height: 100vh;
        padding: 20px 18px 18px;
        border-radius: 0 24px 24px 0;
        transform: translateX(-105%);
        transition: transform 0.28s ease, box-shadow 0.28s ease;
        z-index: 1045;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 24px 80px rgba(15, 23, 42, 0.34);
    }

    .sidebar-mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    .sidebar-mobile-label {
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--sage-sidebar-muted);
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--sage-sidebar-text);
        font-size: 1rem;
    }

    .brand {
        gap: 12px;
    }

    .brand--logo-only .brand-mark {
        max-width: 180px;
        min-height: 64px;
        max-height: 96px;
    }

    .brand-title {
        font-size: 1rem;
        white-space: normal;
    }

    .sidebar-footer .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-footer .fw-semibold,
    .sidebar-footer .text-capitalize,
    .sidebar-footer .small {
        overflow-wrap: anywhere;
    }

    .content-area {
        min-width: 0;
        padding: 12px;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        margin-bottom: 14px;
        border-radius: 20px;
        border: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--sage-card) 92%, transparent 8%) 0%, var(--sage-card) 100%),
            var(--sage-surface-glow);
        box-shadow: var(--sage-panel-shadow);
        position: sticky;
        top: 8px;
        z-index: 70;
    }

    .mobile-header-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .mobile-brand-mark {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        height: 42px;
        max-height: 42px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
        overflow: hidden;
    }

    .mobile-brand-badge {
        width: 100%;
        height: 100%;
        border-radius: inherit;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #2563eb, #10b981);
        color: #fff;
        font-weight: 800;
    }

    .mobile-brand-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 4px;
        background: #fff;
    }

    .mobile-header-copy {
        min-width: 0;
    }

    .mobile-header-label {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--sage-text-muted);
        margin-bottom: 3px;
    }

    .mobile-header-title {
        font-family: "DM Sans", "Inter", sans-serif;
        font-size: 1.02rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        color: var(--sage-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 44px;
        max-height: 44px;
        border: 1px solid color-mix(in srgb, var(--sage-border) 88%, transparent 12%);
        border-radius: 14px;
        background: var(--sage-card);
        color: var(--sage-text);
        box-shadow: var(--sage-panel-shadow);
    }

    .mobile-menu-toggle i {
        font-size: 1.4rem;
        line-height: 1;
    }

    .topbar {
        flex-direction: column;
        gap: 12px;
        padding: 0;
        margin-bottom: 14px;
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .topbar::after {
        display: none;
    }

    .topbar-copy {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
    }

    .topbar-actions .btn-light {
        width: 100%;
        justify-content: center;
        padding-inline: 16px;
        min-height: 48px;
        border-radius: 16px;
    }

    .notification-dropdown {
        justify-self: end;
    }

    .notification-trigger {
        width: 48px;
        min-width: 48px;
        height: 48px;
        border-radius: 16px;
        background: var(--sage-card);
        border: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
        box-shadow: var(--sage-panel-shadow);
    }

    .notification-menu {
        width: min(24rem, calc(100vw - 24px)) !important;
        min-width: min(24rem, calc(100vw - 24px)) !important;
        right: -4px !important;
    }

    .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }

    .metric-card {
        min-height: 148px;
        padding: 20px;
        border-radius: 20px;
    }

    .metric-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 18px;
        border-radius: 16px;
    }

    .metric-label {
        margin-bottom: 10px;
    }

    .metric-value {
        font-size: clamp(1.75rem, 8vw, 2.2rem);
    }

    .pipeline-grid,
    .summary-grid,
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-item {
        padding: 14px 16px 16px;
        border-radius: 18px;
    }

    .pipeline-stage {
        margin-bottom: 8px;
        font-size: 0.84rem;
    }

    .pipeline-total {
        font-size: 1.55rem;
    }

    .section-heading {
        align-items: flex-start;
        margin-bottom: 0.9rem;
    }

    .section-heading .app-chip {
        display: none;
    }

    .section-title {
        font-size: 1.18rem;
    }

    .section-subtitle {
        font-size: 0.92rem;
    }

    .timeline-list {
        gap: 14px;
    }

    .timeline-entry {
        gap: 10px;
        grid-template-columns: 14px 1fr;
    }

    .timeline-dot {
        width: 10px;
        height: 10px;
        margin-top: 5px;
    }

    .timeline-entry .fw-semibold {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .timeline-entry .small {
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .card-body.p-4,
    .filter-panel .card-body,
    .data-panel .card-body,
    .report-chart-panel .card-body {
        padding: 1.1rem !important;
    }

    .table-responsive {
        margin-inline: -2px;
    }

    .card,
    .metric-card,
    .summary-box,
    .task-card,
    .kanban-column,
    .calendar-cell,
    .document-tile {
        border-radius: 16px;
    }

    .filter-panel,
    .data-panel,
    .workspace-panel {
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    }

    .metric-card {
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    }

    .page-title,
    .settings-pane-header .h5 {
        font-size: 1.18rem;
    }

    .form-label {
        font-size: 0.8rem;
    }

    .form-control,
    .form-select,
    textarea,
    .btn {
        font-size: 0.92rem;
    }

    .btn,
    .form-control,
    .form-select {
        min-height: 44px;
    }

    .mobile-collapsible-box {
        position: relative;
        padding: 16px;
        border-radius: 16px;
    }

    .mobile-collapsible-box .mobile-box-head {
        margin-bottom: 0;
    }

    .mobile-collapsible-box .mobile-box-toggle {
        display: inline-flex;
        width: 100%;
        min-height: 44px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 10px;
        border-radius: 14px;
    }

    .mobile-collapsible-box .mobile-box-toggle i {
        transition: transform 0.2s ease;
    }

    .mobile-collapsible-box[data-mobile-collapsed="false"] .mobile-box-toggle i {
        transform: rotate(180deg);
    }

    .mobile-collapsible-box[data-mobile-collapsed="true"] .mobile-box-content {
        display: none;
    }

    .mobile-collapsible-box .mobile-box-content {
        margin-top: 12px;
    }

    .documents-section {
        padding: 16px;
        border-radius: 18px;
    }

    .documents-section-head {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
    }

    .documents-progress-chip,
    .documents-profile-note {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 14px;
    }

    .documents-profile-form {
        padding: 14px;
        border-radius: 16px;
    }

    .document-mobile-card {
        padding: 14px;
        border-radius: 16px;
    }

    .is-mobile-cardified {
        overflow: visible;
        border-radius: 0;
    }

    .is-mobile-cardified > table {
        display: none;
    }

    .is-mobile-cardified .mobile-table-cards {
        display: block;
    }

    .mobile-data-card-head {
        flex-direction: column;
    }

    .mobile-data-card-badges {
        justify-content: flex-start;
    }

    .mobile-data-row {
        flex-direction: column;
        gap: 4px;
    }

    .mobile-data-label,
    .mobile-data-value {
        min-width: 0;
        text-align: left;
    }

    .mobile-data-card-actions {
        flex-direction: column;
    }

    .mobile-data-card-actions form,
    .mobile-data-card-actions .btn,
    .mobile-data-card-actions .form-select {
        width: 100%;
    }

    .students-filter-panel {
        margin-bottom: 14px !important;
        border-radius: 20px;
    }

    .students-filter-panel .section-heading {
        margin-bottom: 0.75rem;
        align-items: flex-start;
    }

    .students-filter-panel .section-kicker {
        font-size: 0.72rem;
        margin-bottom: 0.2rem;
    }

    .students-filter-panel .section-title {
        font-size: 1.12rem;
        margin-bottom: 0.2rem;
    }

    .students-filter-panel .section-subtitle {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .students-filter-panel .app-chip {
        display: none;
    }

    .students-filter-toggle {
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .students-filter-form[data-mobile-collapsed="true"] {
        display: none;
    }

    .students-filter-form {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .students-filter-panel .card-body {
        padding: 16px !important;
    }

    .students-filter-panel .form-label {
        font-size: 0.81rem;
        font-weight: 700;
        margin-bottom: 0.3rem;
    }

    .students-filter-panel .form-control,
    .students-filter-panel .form-select {
        min-height: 44px;
        font-size: 0.88rem;
        padding: 0.65rem 0.85rem;
        border-radius: 14px;
    }

    .students-filter-submit-col .btn,
    .students-filter-export-col .btn {
        width: 100%;
        min-height: 48px;
        border-radius: 14px;
    }

    .students-filter-submit-col {
        margin-top: 2px;
    }

    .students-filter-export-col {
        margin-top: -2px;
    }

    .students-table-panel {
        display: none;
    }

    .students-mobile-list {
        display: grid;
        gap: 12px;
    }

    .students-mobile-card {
        padding: 14px;
        border-radius: 16px;
    }

    .students-mobile-card-head {
        gap: 10px;
        margin-bottom: 10px;
        flex-direction: column;
    }

    .students-mobile-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .students-mobile-actions {
        flex-direction: column;
        gap: 8px;
    }

    .students-mobile-actions form,
    .students-mobile-actions .btn {
        width: 100%;
    }

.students-mobile-actions .btn {
    min-height: 44px;
}

.student-updated-cell {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 220px;
}

.student-updated-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 6px;
    flex-shrink: 0;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.student-updated-dot-fresh {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.student-updated-dot-recent {
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.student-updated-dot-stale {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.student-updated-time {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.25;
}

.student-updated-activity {
    margin-top: 3px;
    color: var(--sage-text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

    .students-empty-card {
        padding: 22px 16px;
        border-radius: 18px;
    }

    .task-summary-row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .task-summary-col {
        width: 50%;
    }

    .task-summary-col .metric-card {
        min-height: 98px;
        padding: 16px;
        border-radius: 18px;
    }

    .task-summary-col .metric-label {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .task-summary-col .metric-value {
        font-size: clamp(1.55rem, 7vw, 2rem);
        line-height: 1;
    }

    .tasks-filter-panel {
        margin-bottom: 14px !important;
        border-radius: 20px;
    }

    .tasks-filter-panel .section-heading {
        margin-bottom: 0.75rem;
        align-items: flex-start;
    }

    .tasks-filter-panel .section-kicker {
        font-size: 0.72rem;
        margin-bottom: 0.2rem;
    }

    .tasks-filter-panel .section-title {
        font-size: 1.12rem;
        margin-bottom: 0.2rem;
    }

    .tasks-filter-panel .section-subtitle {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .tasks-filter-panel .app-chip {
        display: none;
    }

    .tasks-filter-toggle,
    .tasks-create-toggle {
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .tasks-filter-form[data-mobile-collapsed="true"],
    .tasks-create-form[data-mobile-collapsed="true"] {
        display: none;
    }

    .tasks-filter-form,
    .tasks-create-form {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .tasks-filter-panel .card-body,
    .tasks-create-panel .card-body {
        padding: 16px !important;
    }

    .tasks-filter-panel .form-label,
    .tasks-create-panel .form-label {
        font-size: 0.81rem;
        font-weight: 700;
        margin-bottom: 0.3rem;
    }

    .tasks-filter-panel .form-control,
    .tasks-filter-panel .form-select,
    .tasks-create-panel .form-control,
    .tasks-create-panel .form-select,
    .tasks-create-panel textarea {
        min-height: 44px;
        font-size: 0.88rem;
        padding: 0.65rem 0.85rem;
        border-radius: 14px;
    }

    .tasks-create-panel textarea {
        min-height: 84px;
    }

    .tasks-filter-submit-col .btn,
    .tasks-create-panel .btn-primary {
        width: 100%;
        min-height: 48px;
        border-radius: 14px;
    }

    .tasks-content-row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .tasks-create-col {
        order: -1;
    }

    .tasks-create-panel {
        border-radius: 20px;
    }

    .tasks-table-wrap {
        display: none;
    }

    .tasks-mobile-list {
        display: grid;
        gap: 12px;
    }

    .tasks-mobile-card {
        padding: 14px;
        border-radius: 16px;
    }

    .tasks-mobile-card-head {
        flex-direction: column;
        gap: 10px;
    }

    .tasks-mobile-badges {
        justify-content: flex-start;
    }

    .tasks-mobile-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tasks-mobile-actions {
        flex-direction: column;
    }

    .tasks-mobile-status-form,
    .tasks-mobile-actions form,
    .tasks-mobile-actions .btn,
    .tasks-mobile-actions .form-select {
        width: 100%;
    }

    .tasks-mobile-actions .btn,
    .tasks-mobile-actions .form-select {
        min-height: 44px;
    }

    .tasks-empty-card {
        padding: 22px 16px;
        border-radius: 18px;
    }

    .reports-filter-panel {
        margin-bottom: 14px !important;
        border-radius: 20px;
    }

    .reports-filter-panel .section-heading {
        margin-bottom: 0.75rem;
        align-items: flex-start;
    }

    .reports-filter-panel .section-kicker {
        font-size: 0.72rem;
        margin-bottom: 0.2rem;
    }

    .reports-filter-panel .section-title {
        font-size: 1.12rem;
        margin-bottom: 0.2rem;
    }

    .reports-filter-panel .section-subtitle {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .reports-filter-panel .app-chip {
        display: none;
    }

    .reports-filter-toggle {
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .reports-filter-form[data-mobile-collapsed="true"] {
        display: none;
    }

    .reports-filter-form {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .reports-filter-panel .card-body {
        padding: 16px !important;
    }

    .reports-filter-panel .form-label {
        font-size: 0.81rem;
        font-weight: 700;
        margin-bottom: 0.3rem;
    }

    .reports-filter-panel .form-control,
    .reports-filter-panel .form-select {
        min-height: 44px;
        font-size: 0.88rem;
        padding: 0.65rem 0.85rem;
        border-radius: 14px;
    }

    .reports-filter-form .btn-primary {
        width: 100%;
        min-height: 48px;
        border-radius: 14px;
    }

    .reports-export-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
    }

    .reports-export-group .btn {
        min-height: 44px;
        width: 100%;
        border-radius: 14px;
        justify-content: center;
    }

    .reports-desktop-only {
        display: none;
    }

    .reports-mobile-shell {
        display: block;
    }

    .settings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 2px 2px 10px;
        margin-inline: -2px;
        scrollbar-width: none;
    }

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

    .settings-tabs .nav-item {
        flex: 0 0 auto;
    }

    .settings-tabs .nav-link {
        min-height: 42px;
        padding: 0.72rem 1rem;
        white-space: nowrap;
    }

    .settings-team-pane,
    .team-pane-card,
    .settings-pane-body {
        overflow: hidden;
    }

    .settings-pane-header {
        margin-bottom: 0.9rem;
        padding-inline: 2px;
    }

    .settings-pane-header .h5 {
        font-size: 1.2rem;
    }

    .settings-pane-header .small {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .team-pane-card {
        border-radius: 22px;
    }

    .settings-pane-body {
        padding: 16px !important;
    }

    .user-form-layout {
        max-width: 100%;
        margin-bottom: 1rem !important;
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .team-form-section,
    .team-permissions-box {
        padding: 16px;
        border-radius: 18px;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
    }

    .settings-team-pane .form-label {
        font-size: 0.78rem;
        font-weight: 700;
        margin-bottom: 0.32rem;
    }

    .settings-team-pane .form-control,
    .settings-team-pane .form-select {
        min-height: 44px;
        font-size: 0.92rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        border-radius: 14px;
    }

    .settings-team-pane .form-text,
    .settings-team-pane .small {
        font-size: 0.78rem;
    }

    .team-form-section-header,
    .team-permissions-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .team-form-section-title {
        font-size: 0.98rem;
    }

    .team-permissions-box[data-mobile-collapsed="true"] .team-permissions-content {
        display: none;
    }

    .team-permissions-toggle {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .permission-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .permission-card {
        padding: 12px;
        gap: 10px;
        border-radius: 14px;
    }

    .permission-title {
        font-size: 0.88rem;
    }

    .permission-description {
        font-size: 0.77rem;
    }

    .team-form-actions {
        position: sticky;
        bottom: 8px;
        z-index: 25;
        padding: 10px;
        border-radius: 18px;
        background: color-mix(in srgb, var(--sage-card) 92%, transparent 8%);
        border: 1px solid color-mix(in srgb, var(--sage-border) 90%, transparent 10%);
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
        flex-direction: column;
        align-items: stretch;
        backdrop-filter: blur(10px);
    }

    .team-form-actions .btn {
        width: 100%;
    }

    .team-members-table-wrap {
        display: none;
    }

    .team-user-cards {
        display: grid;
        gap: 12px;
        margin-top: 0.5rem;
    }

    .team-user-card {
        padding: 14px;
        border-radius: 16px;
    }

    .team-user-card-head,
    .team-user-meta {
        grid-template-columns: 1fr;
    }

    .team-user-card-head {
        flex-direction: column;
    }

    .team-user-badges {
        justify-content: flex-start;
    }

    .team-user-actions {
        flex-direction: column;
    }

    .team-user-actions form,
    .team-user-actions .btn {
        width: 100%;
    }

    .team-user-actions .btn {
        min-height: 44px;
    }
}
