:root {
    --primary: #6c5ce7;
    --primary-rgb: 108, 92, 231;
    --secondary: #20bfa9;
    --accent: #ff8a65;
    --app-bg: #eef2f7;
    --ink: #172033;
    --muted: #718096;
    --line: rgba(89, 101, 131, .13);
    --glass: rgba(255, 255, 255, .68);
    --app-font: 'Manrope', sans-serif;
    --base-size: 16px;
    --radius: 22px;
    --shadow: 0 18px 50px rgba(45, 55, 90, .09);
}

* { box-sizing: border-box; }
html { font-size: var(--base-size); }
body { margin: 0; color: var(--ink); font-family: var(--app-font); background: var(--app-bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, textarea, select { font-family: inherit; }

.app-body { min-height: 100vh; overflow-x: hidden; }
.ambient { position: fixed; border-radius: 999px; filter: blur(1px); pointer-events: none; z-index: -1; opacity: .55; }
.ambient-one { width: 360px; height: 360px; left: 12%; top: -150px; background: radial-gradient(circle, rgba(108,92,231,.34), transparent 68%); }
.ambient-two { width: 420px; height: 420px; right: -140px; bottom: -130px; background: radial-gradient(circle, rgba(32,191,169,.28), transparent 68%); }
.glass-panel, .glass-card { background: var(--glass); border: 1px solid rgba(255,255,255,.72); box-shadow: var(--shadow); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.glass-card { border-radius: var(--radius); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 256px minmax(0,1fr); gap: 20px; padding: 18px; }

.sidebar { position: sticky; top: 18px; height: calc(100vh - 36px); border-radius: 28px; padding: 22px 16px 16px; display: flex; flex-direction: column; z-index: 20; }
.app-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; min-width: 0; }
.app-brand > span:last-child { display: grid; min-width: 0; }
.app-brand strong { font-size: 1.02rem; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-brand small { color: var(--muted); font-size: .61rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-brand > img { width: 44px; height: 44px; object-fit: contain; }
.brand-mark { flex: 0 0 auto; width: 44px; height: 44px; display: inline-grid; place-items: center; color: #fff; border-radius: 15px; font-size: 1.3rem; background: linear-gradient(145deg, var(--primary), #8778f3); box-shadow: 0 10px 22px rgba(108,92,231,.25); }
.side-nav { display: flex; flex-direction: column; gap: 5px; margin-top: 35px; flex: 1; }
.nav-caption { color: #9aa4b6; font-size: .62rem; font-weight: 800; letter-spacing: .13em; padding: 0 12px 8px; }
.side-nav a { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 15px; color: #667188; font-size: .84rem; font-weight: 650; transition: .2s ease; }
.side-nav a i { font-size: 1.06rem; }
.side-nav a b { margin-left: auto; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border-radius: 99px; color: #fff; background: var(--accent); font-size: .62rem; }
.side-nav a:hover { color: var(--primary); background: rgba(108,92,231,.07); transform: translateX(2px); }
.side-nav a.active { color: var(--primary); background: linear-gradient(90deg, rgba(108,92,231,.14), rgba(108,92,231,.05)); box-shadow: inset 3px 0 var(--primary); }
.sidebar-user { display: grid; grid-template-columns: 38px minmax(0,1fr) 28px; align-items: center; gap: 9px; padding: 12px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.45); border-radius: 17px; }
.sidebar-user img { width: 38px; height: 38px; border-radius: 13px; object-fit: cover; }
.sidebar-user span { display: grid; min-width: 0; }
.sidebar-user strong { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user > a { display: grid; place-items: center; color: var(--muted); }

.app-main { min-width: 0; }
.topbar { height: 83px; display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 8px; gap: 20px; }
.topbar h1 { font-size: 1.55rem; letter-spacing: -.045em; margin: 0; font-weight: 800; }
.eyebrow { color: var(--primary); font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.75); background: rgba(255,255,255,.58); border-radius: 14px; display: grid; place-items: center; color: var(--ink); box-shadow: 0 8px 24px rgba(50,60,90,.06); }
.icon-button:hover { color: var(--primary); transform: translateY(-1px); }
.notification-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; right: 8px; top: 7px; background: var(--accent); border: 2px solid #fff; }
.profile-chip { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.75); border-radius: 15px; padding: 5px 12px 5px 5px; font-size: .78rem; font-weight: 700; }
.profile-chip img { width: 32px; height: 32px; border-radius: 11px; object-fit: cover; }
.page-content { padding: 8px; max-width: 1480px; margin: 0 auto; }
.mobile-nav { display: none; }

.btn { font-weight: 700; border-width: 0; letter-spacing: -.01em; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-active-bg: var(--primary); background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary), #fff 15%)); box-shadow: 0 12px 22px rgba(108,92,231,.2); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 15px 28px rgba(108,92,231,.27); }
.btn-soft-primary { color: var(--primary); background: rgba(108,92,231,.1); }
.btn-soft-primary:hover { color: #fff; background: var(--primary); }
.btn-soft-danger { color: #d94b61; background: rgba(217,75,97,.1); }
.btn-soft-success { color: #148f79; background: rgba(32,191,169,.12); }
.form-control, .form-select { min-height: 48px; padding: .7rem .95rem; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background-color: rgba(255,255,255,.7); box-shadow: none !important; font-size: .87rem; }
.form-control:focus, .form-select:focus { border-color: rgba(108,92,231,.48); background: #fff; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-label { color: #485269; font-size: .73rem; font-weight: 750; margin-bottom: .42rem; }
.form-section-title { color: var(--ink); display: flex; align-items: center; gap: 8px; font-size: .79rem; font-weight: 800; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 15px; }
.form-section-title i { color: var(--primary); }
.soft-check { display: flex; align-items: center; gap: 9px; cursor: pointer; color: #58647a; font-size: .8rem; }
.soft-check input { position: absolute; opacity: 0; }
.soft-check span { width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; place-items: center; color: transparent; transition: .2s; }
.soft-check input:checked + span { background: var(--primary); color: #fff; }
.password-field { position: relative; }
.password-field > button { position: absolute; z-index: 4; right: 9px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); padding: 7px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { position: relative; padding: 20px; overflow: hidden; min-height: 137px; }
.stat-card .stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; font-size: 1.1rem; margin-bottom: 18px; }
.stat-card h3 { font-size: 1.55rem; margin: 0; font-weight: 800; letter-spacing: -.04em; }
.stat-card p { color: var(--muted); margin: 3px 0 0; font-size: .72rem; }
.stat-card small { position: absolute; right: 14px; top: 15px; font-size: .62rem; font-weight: 800; color: var(--secondary); background: rgba(32,191,169,.1); padding: 5px 8px; border-radius: 99px; }
.stat-card.purple .stat-icon { color: var(--primary); background: rgba(108,92,231,.12); }
.stat-card.green .stat-icon { color: #149b84; background: rgba(32,191,169,.13); }
.stat-card.orange .stat-icon { color: #ef7650; background: rgba(255,138,101,.13); }
.stat-card.blue .stat-icon { color: #3d82da; background: rgba(61,130,218,.12); }
.content-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.75fr); gap: 18px; }
.panel-card { padding: 22px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-header h2 { font-size: 1rem; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.panel-header p { color: var(--muted); font-size: .7rem; margin: 3px 0 0; }
.panel-header > a { color: var(--primary); font-size: .72rem; font-weight: 800; }
.empty-state { min-height: 400px; display: grid; place-items: center; align-content: center; text-align: center; padding: 35px; }
.empty-state .empty-icon, .empty-icon { width: 76px; height: 76px; border-radius: 25px; display: grid; place-items: center; background: rgba(108,92,231,.1); color: var(--primary); font-size: 1.8rem; margin-bottom: 16px; }
.empty-state h1 { font-size: 1.3rem; font-weight: 800; }
.empty-state p { color: var(--muted); max-width: 460px; font-size: .82rem; }

.timeline-list { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.5); border: 1px solid var(--line); }
.date-badge { width: 54px; height: 54px; display: grid; place-items: center; align-content: center; border-radius: 15px; color: var(--primary); background: rgba(108,92,231,.09); }
.date-badge strong { font-size: 1.08rem; line-height: 1; }
.date-badge small { font-size: .56rem; font-weight: 800; }
.timeline-item h3 { font-size: .78rem; font-weight: 800; margin: 0 0 3px; }
.timeline-item p { color: var(--muted); font-size: .66rem; margin: 0; }
.timeline-item .time-pill { font-size: .62rem; font-weight: 800; color: #536078; padding: 6px 9px; background: #fff; border-radius: 99px; }
.quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.quick-action { min-height: 98px; padding: 15px; border-radius: 17px; border: 1px solid var(--line); background: rgba(255,255,255,.48); display: grid; align-content: space-between; transition: .2s; }
.quick-action i { font-size: 1.2rem; color: var(--primary); }
.quick-action strong { font-size: .7rem; }
.quick-action:hover { transform: translateY(-2px); border-color: rgba(108,92,231,.28); }
.welcome-card { padding: 25px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; overflow: hidden; position: relative; background: linear-gradient(120deg, rgba(108,92,231,.91), rgba(96,79,220,.8)); color: #fff; }
.welcome-card::after { content: ''; width: 230px; height: 230px; border-radius: 50%; position: absolute; right: -60px; top: -130px; border: 35px solid rgba(255,255,255,.08); }
.welcome-card h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 6px; }
.welcome-card p { margin: 0; opacity: .8; font-size: .77rem; }
.welcome-card .btn { position: relative; z-index: 1; background: #fff; color: var(--primary); white-space: nowrap; }

.data-toolbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.search-box { position: relative; max-width: 360px; flex: 1; }
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .form-control { padding-left: 41px; }
.modern-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.modern-table th { color: #97a0b0; font-size: .61rem; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 4px; border: 0; }
.modern-table td { padding: 12px; background: rgba(255,255,255,.54); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .75rem; }
.modern-table td:first-child { border-left: 1px solid var(--line); border-radius: 15px 0 0 15px; }
.modern-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 15px 15px 0; }
.user-cell { display: flex; gap: 10px; align-items: center; }
.user-cell img { width: 38px; height: 38px; object-fit: cover; border-radius: 12px; }
.user-cell span { display: grid; }
.user-cell strong { font-size: .74rem; }
.user-cell small { color: var(--muted); font-size: .62rem; }
.role-badge, .status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 99px; font-size: .61rem; font-weight: 800; background: rgba(108,92,231,.1); color: var(--primary); }
.status-badge.success { background: rgba(32,191,169,.11); color: #138e78; }
.status-badge.warning { background: rgba(255,176,62,.14); color: #b46e08; }
.status-badge.danger { background: rgba(217,75,97,.11); color: #c94259; }
.action-menu { display: flex; justify-content: flex-end; gap: 6px; }
.action-menu a, .action-menu button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; border: 0; background: rgba(108,92,231,.08); color: var(--primary); }

.profile-layout { display: grid; grid-template-columns: 285px minmax(0,1fr); gap: 18px; }
.profile-summary { padding: 25px; align-self: start; text-align: center; position: sticky; top: 18px; }
.profile-photo { width: 106px; height: 106px; object-fit: cover; border-radius: 34px; border: 5px solid rgba(255,255,255,.8); box-shadow: 0 15px 35px rgba(42,51,80,.14); }
.profile-summary h2 { font-size: 1.05rem; font-weight: 800; margin: 15px 0 4px; }
.profile-summary p { color: var(--muted); font-size: .7rem; }
.profile-completion { text-align: left; margin-top: 20px; }
.profile-completion div { display: flex; justify-content: space-between; font-size: .65rem; font-weight: 700; margin-bottom: 7px; }
.progress { background: rgba(108,92,231,.08); height: 7px; }
.progress-bar { background: linear-gradient(90deg,var(--primary),var(--secondary)); }
.profile-clicks-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.profile-click { min-width: 0; padding: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.48); border-radius: 16px; display: grid; gap: 6px; }
.profile-click > div { height: 105px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; color: var(--primary); background: rgba(108,92,231,.08); font-size: 1.5rem; }
.profile-click img { width: 100%; height: 100%; object-fit: cover; }
.profile-click strong { font-size: .65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-click small { color: var(--muted); font-size: .55rem; }
.form-card { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }

.schedule-board { display: grid; grid-template-columns: repeat(7, minmax(130px,1fr)); gap: 9px; overflow-x: auto; padding-bottom: 5px; }
.schedule-day { min-height: 210px; border-radius: 18px; padding: 12px; background: rgba(255,255,255,.4); border: 1px solid var(--line); }
.schedule-day.today { border-color: rgba(108,92,231,.35); background: rgba(108,92,231,.06); }
.day-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; }
.day-header span { color: var(--muted); font-size: .63rem; font-weight: 700; }
.day-header strong { font-size: .88rem; }
.shift-block { display: block; padding: 10px; border-radius: 13px; color: #fff; background: linear-gradient(135deg,var(--primary),#8677ec); margin-bottom: 8px; box-shadow: 0 8px 17px rgba(108,92,231,.18); }
.shift-block.green { background: linear-gradient(135deg,#21af99,#45cdb8); box-shadow: 0 8px 17px rgba(32,191,169,.18); }
.shift-block strong { display: block; font-size: .67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-block small { display: block; font-size: .56rem; opacity: .82; margin-top: 3px; }
.swap-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px; border-radius: 16px; background: rgba(255,255,255,.5); border: 1px solid var(--line); }
.swap-card > i { width: 42px; height: 42px; display: grid; place-items: center; color: var(--primary); background: rgba(108,92,231,.1); border-radius: 14px; }
.swap-card h4 { margin: 0 0 3px; font-size: .73rem; font-weight: 800; }
.swap-card p { margin: 0; color: var(--muted); font-size: .63rem; }

.checklist { display: grid; gap: 12px; }
.check-item { padding: 17px; background: rgba(255,255,255,.52); border: 1px solid var(--line); border-radius: 18px; transition: .2s; }
.check-item.has-no { border-color: rgba(217,75,97,.3); background: rgba(255,247,248,.76); }
.check-question { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.check-question label:first-child { font-size: .78rem; font-weight: 750; flex: 1; }
.answer-toggle { display: flex; flex: 0 0 auto; padding: 4px; border-radius: 99px; background: rgba(101,112,137,.08); }
.answer-toggle input { position: absolute; opacity: 0; }
.answer-toggle label { cursor: pointer; min-width: 58px; text-align: center; padding: 7px 10px; border-radius: 99px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.answer-toggle input:checked + label { color: #fff; background: var(--secondary); }
.answer-toggle input[value="0"]:checked + label { background: #d94b61; }
.reason-field { display: none; margin-top: 12px; }
.check-item.has-no .reason-field { display: block; }
.lock-notice { display: flex; gap: 12px; padding: 14px; border-radius: 16px; color: #744f0b; background: rgba(255,187,64,.12); font-size: .72rem; }
.report-answers { display: grid; gap: 9px; }
.report-answer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 14px; background: rgba(255,255,255,.5); border: 1px solid var(--line); border-radius: 15px; }
.report-answer h4 { font-size: .73rem; margin: 0; font-weight: 750; }
.report-answer p { margin: 7px 0 0; color: #b03f52; font-size: .66rem; }

.feed-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; }
.composer { padding: 18px; margin-bottom: 15px; }
.composer-top { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 11px; }
.composer-top img { width: 44px; height: 44px; object-fit: cover; border-radius: 14px; }
.composer textarea { min-height: 78px; border: 0; background: transparent; padding: 9px 4px; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.photo-picker { color: var(--primary); font-size: .72rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.photo-picker input { display: none; }
.post-card { padding: 18px; margin-bottom: 15px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.post-head img { width: 43px; height: 43px; border-radius: 14px; object-fit: cover; }
.post-head span { display: grid; }
.post-head strong { font-size: .77rem; }
.post-head small { color: var(--muted); font-size: .6rem; }
.post-content { white-space: pre-wrap; font-size: .78rem; line-height: 1.65; }
.post-photo { width: 100%; max-height: 520px; object-fit: cover; border-radius: 18px; margin-top: 12px; background: #e6e9ef; }
.post-mentions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.post-mentions span { color: var(--primary); background: rgba(108,92,231,.09); font-size: .61rem; font-weight: 750; border-radius: 99px; padding: 5px 8px; }
.mention-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 180px; overflow-y: auto; }
.mention-option { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.5); border-radius: 12px; font-size: .64rem; cursor: pointer; }
.mention-option input { accent-color: var(--primary); }
.camera-preview { display: none; width: 100%; max-height: 280px; object-fit: cover; border-radius: 15px; margin-top: 10px; }

.notification-list { display: grid; gap: 9px; }
.notification-item { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px; border-radius: 17px; background: rgba(255,255,255,.5); border: 1px solid var(--line); }
.notification-item.unread { background: rgba(108,92,231,.06); border-color: rgba(108,92,231,.17); }
.notification-item > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: rgba(108,92,231,.1); }
.notification-item h3 { margin: 0 0 4px; font-size: .75rem; font-weight: 800; }
.notification-item p { margin: 0; color: var(--muted); font-size: .66rem; }
.notification-item time { color: #9ca5b5; font-size: .58rem; white-space: nowrap; }

.theme-preview { padding: 18px; background: linear-gradient(140deg,var(--primary),var(--secondary)); color: #fff; border-radius: var(--radius); min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; }
.theme-preview .mock-card { width: 70%; min-height: 60px; padding: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.2); border-radius: calc(var(--radius) * .7); backdrop-filter: blur(12px); }
.color-input { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; }
.color-input input[type="color"] { width: 48px; height: 48px; border: 0; background: transparent; border-radius: 13px; padding: 0; overflow: hidden; }
.module-permission-card { padding: 18px; }
.module-permission-card h3 { font-size: .86rem; font-weight: 800; }
.permission-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .73rem; }
.permission-row:last-child { border: 0; }
.form-switch .form-check-input { width: 2.8em; height: 1.45em; border: 0; background-color: #d8dce5; box-shadow: none; }
.form-switch .form-check-input:checked { background-color: var(--primary); }
.security-note { padding: 12px; border-radius: 14px; background: rgba(32,191,169,.09); color: #197d6d; display: flex; gap: 8px; align-items: center; font-size: .7rem; }

/* Login e instalador */
.login-page, .installer-page { min-height: 100vh; background: #edf1f7; overflow-x: hidden; }
.login-orb { position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-a { width: 480px; height: 480px; left: -190px; bottom: -190px; background: radial-gradient(circle,rgba(108,92,231,.28),transparent 68%); }
.orb-b { width: 420px; height: 420px; right: -150px; top: -140px; background: radial-gradient(circle,rgba(32,191,169,.22),transparent 70%); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(440px,1.15fr) minmax(420px,.85fr); }
.login-story { position: relative; overflow: hidden; padding: clamp(38px,6vw,85px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(140deg,#5c4bd1 0%,#7968e4 52%,#4f88d3 100%); }
.login-story::before { content: ''; position: absolute; width: 530px; height: 530px; right: -250px; bottom: -235px; border-radius: 50%; border: 75px solid rgba(255,255,255,.07); }
.login-story::after { content: ''; position: absolute; width: 260px; height: 260px; left: 42%; top: 18%; border-radius: 50%; background: rgba(255,255,255,.04); }
.login-brand { position: relative; z-index: 2; color: #fff; padding: 0; }
.login-brand small { color: rgba(255,255,255,.7); }
.login-brand .brand-mark { background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.story-copy { position: relative; z-index: 2; max-width: 560px; }
.story-copy .eyebrow { color: rgba(255,255,255,.68); }
.story-copy h1 { font-size: clamp(2.7rem,5vw,5.2rem); line-height: .99; letter-spacing: -.065em; font-weight: 800; margin: 18px 0 24px; }
.story-copy h1 span { color: #8ff1d6; }
.story-copy p { max-width: 500px; color: rgba(255,255,255,.78); font-size: clamp(.9rem,1.3vw,1.08rem); line-height: 1.7; }
.floating-card { position: absolute; z-index: 2; display: flex; gap: 11px; align-items: center; padding: 13px 16px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.13); box-shadow: 0 20px 40px rgba(30,25,90,.16); backdrop-filter: blur(18px); border-radius: 18px; }
.floating-card > i { width: 38px; height: 38px; display: grid; place-items: center; color: #8ff1d6; background: rgba(143,241,214,.12); border-radius: 12px; font-size: 1.2rem; }
.floating-card > span:not(.avatar-stack) { display: grid; }
.floating-card strong { font-size: .69rem; }
.floating-card small { color: rgba(255,255,255,.65); font-size: .58rem; }
.card-one { right: 7%; top: 24%; transform: rotate(2deg); }
.card-two { left: 9%; bottom: 8%; transform: rotate(-1deg); }
.avatar-stack { display: flex; }
.avatar-stack b { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-right: -6px; border: 2px solid #6c5ed4; background: #fff; color: var(--primary); font-size: .55rem; }
.login-card { align-self: center; justify-self: center; width: min(440px,calc(100% - 50px)); padding: clamp(28px,4vw,48px); position: relative; z-index: 3; }
.login-card h2 { margin: 8px 0 5px; font-size: 1.65rem; font-weight: 800; letter-spacing: -.045em; }
.login-card > p { font-size: .78rem; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; z-index: 3; left: 15px; top: 50%; transform: translateY(-50%); color: #8b95a7; }
.input-icon .form-control { padding-left: 42px; min-height: 54px; }
.input-icon.password-field .form-control { padding-right: 45px; }
.mobile-login-brand { display: none; }
.pwa-login-install { width: 100%; border: 0; background: transparent; color: var(--primary); font-size: .72rem; font-weight: 800; margin-top: 14px; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 6px; color: #99a2b1 !important; font-size: .62rem !important; margin: 28px 0 0; text-align: center; }
.installer-shell { width: min(1180px,calc(100% - 36px)); margin: 0 auto; min-height: 100vh; display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: clamp(35px,7vw,90px); padding: 40px 0; }
.installer-intro h1 { font-size: clamp(2.7rem,5vw,4.8rem); line-height: .98; letter-spacing: -.065em; font-weight: 800; margin: 20px 0; }
.installer-intro h1 span { color: var(--primary); }
.installer-intro > p { color: var(--muted); max-width: 430px; line-height: 1.7; font-size: .85rem; }
.installer-intro .brand-mark { margin-bottom: 30px; }
.install-benefits { display: grid; gap: 10px; margin-top: 32px; }
.install-benefits div { display: flex; gap: 10px; align-items: center; color: #58647a; font-size: .75rem; font-weight: 650; }
.install-benefits i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary); background: rgba(108,92,231,.1); border-radius: 11px; }
.installer-card { padding: clamp(24px,4vw,42px); max-height: calc(100vh - 60px); overflow-y: auto; }
.installer-card h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.04em; }
.status-pill { white-space: nowrap; color: #178b77; background: rgba(32,191,169,.1); border-radius: 99px; padding: 7px 10px; font-size: .62rem; font-weight: 800; }
.success-orb { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 27px; color: #fff; background: linear-gradient(135deg,var(--secondary),#55d9c2); box-shadow: 0 16px 35px rgba(32,191,169,.25); font-size: 2rem; margin-bottom: 25px; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .login-story { padding: 45px; }
    .floating-card { display: none; }
    .content-grid, .feed-layout { grid-template-columns: 1fr; }
    .feed-layout > aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
}

@media (max-width: 820px) {
    body { padding-bottom: calc(79px + env(safe-area-inset-bottom)); }
    .app-shell { display: block; padding: 12px; min-height: auto; }
    .sidebar { display: none; }
    .topbar { height: 70px; padding: 2px 3px 8px; }
    .topbar .eyebrow { display: none; }
    .topbar h1 { font-size: 1.3rem; }
    .profile-chip span { display: none; }
    .profile-chip { padding-right: 5px; }
    .mobile-nav { position: fixed; display: flex; align-items: stretch; justify-content: space-around; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 66px; border-radius: 23px; z-index: 1000; padding: 7px; }
    .mobile-nav a { position: relative; flex: 1; display: grid; place-items: center; align-content: center; gap: 3px; color: #8a94a7; font-size: .51rem; font-weight: 700; border-radius: 16px; min-width: 0; }
    .mobile-nav a i { font-size: 1.08rem; }
    .mobile-nav a span { white-space: nowrap; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
    .mobile-nav a.active { color: var(--primary); background: rgba(108,92,231,.1); }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-clicks-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .profile-summary { position: static; }
    .schedule-board { grid-template-columns: repeat(7,145px); }
    .login-shell { display: block; min-height: 100vh; padding: 22px 0; }
    .login-story { display: none; }
    .login-card { width: min(440px,calc(100% - 28px)); margin: 0 auto; padding: 30px 23px; }
    .mobile-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 35px; }
    .mobile-login-brand strong { font-size: 1rem; }
    .installer-shell { grid-template-columns: 1fr; padding: 30px 0; }
    .installer-intro { display: none; }
    .installer-card { max-height: none; }
}

@media (max-width: 580px) {
    .page-content { padding: 4px 0; }
    .top-actions .icon-button:first-child { display: none !important; }
    .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .stat-card { min-height: 126px; padding: 15px; }
    .stat-card h3 { font-size: 1.3rem; }
    .stat-card small { display: none; }
    .welcome-card { align-items: flex-start; flex-direction: column; padding: 20px; }
    .welcome-card .btn { width: 100%; }
    .panel-card, .form-card { padding: 17px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .profile-clicks-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .data-toolbar { align-items: stretch; flex-direction: column; }
    .data-toolbar .btn { width: 100%; }
    .modern-table, .modern-table tbody, .modern-table tr, .modern-table td { display: block; width: 100%; }
    .modern-table thead { display: none; }
    .modern-table tr { margin-bottom: 10px; }
    .modern-table td { border: 0 !important; border-radius: 0 !important; padding: 7px 12px; }
    .modern-table td:first-child { border-radius: 15px 15px 0 0 !important; padding-top: 12px; }
    .modern-table td:last-child { border-radius: 0 0 15px 15px !important; padding-bottom: 12px; }
    .action-menu { justify-content: flex-start; }
    .check-question { align-items: flex-start; flex-direction: column; gap: 12px; }
    .answer-toggle { width: 100%; }
    .answer-toggle label { flex: 1; }
    .composer-actions { align-items: stretch; flex-direction: column; }
    .feed-layout > aside { display: block; }
    .mention-grid { grid-template-columns: 1fr; }
    .notification-item { grid-template-columns: 40px minmax(0,1fr); }
    .notification-item time { grid-column: 2; }
    .installer-card { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
