/* Unified campus interface — 0.9 */
:root {
  --card-shadow: 0 12px 34px rgba(23,35,78,.065);
  --card-shadow-hover: 0 20px 48px rgba(23,35,78,.12);
  --modern-line: color-mix(in srgb,var(--line) 76%,transparent);
}
body { background-image:radial-gradient(circle at 88% 8%,color-mix(in srgb,var(--primary) 7%,transparent),transparent 25rem),radial-gradient(circle at 18% 72%,color-mix(in srgb,var(--cyan) 5%,transparent),transparent 28rem); }
.content[data-page] { animation:page-enter .24s ease both; }
@keyframes page-enter { from { opacity:.35; transform:translateY(5px); } to { opacity:1; transform:none; } }
.content[data-page="chat"] { animation:none; }
.topbar-page-icon { width:44px; height:44px; display:grid; place-items:center; flex:0 0 auto; margin-right:12px; border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line)); border-radius:15px; color:var(--primary); background:linear-gradient(145deg,var(--primary-soft),var(--white)); box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 10%,transparent); }.topbar-page-icon .ui-icon { width:22px; height:22px; }
.card { border-color:var(--modern-line); box-shadow:var(--card-shadow); }
.card[data-action],article.card[data-action],button.card { transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.card[data-action]:hover,article.card[data-action]:hover,button.card:hover { transform:translateY(-3px); border-color:color-mix(in srgb,var(--primary) 34%,var(--line)); box-shadow:var(--card-shadow-hover); }
.section-heading { margin:22px 0 14px; }
.section-heading:first-child { margin-top:4px; }
.section-heading h2 { font-size:clamp(19px,2vw,23px); font-weight:850; letter-spacing:-.035em; }
.section-heading p { max-width:680px; font-size:12px; line-height:1.45; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; border:1px solid transparent; border-radius:14px; }
.button.small { min-height:36px; padding:8px 13px; border-radius:12px; }
.button .ui-icon { width:17px; height:17px; }
.button.ghost { border-color:var(--modern-line); background:color-mix(in srgb,var(--white) 75%,var(--surface-alt)); }
.button.secondary { border-color:color-mix(in srgb,var(--primary) 18%,transparent); }
.icon-button { border:1px solid var(--modern-line); box-shadow:0 6px 18px rgba(27,39,76,.055); transition:transform .18s,border-color .18s,background .18s; }
.icon-button:hover { transform:translateY(-1px); border-color:color-mix(in srgb,var(--primary) 34%,var(--line)); background:var(--primary-soft); }
input,select,textarea { min-height:45px; border-color:var(--modern-line); border-radius:14px; background:color-mix(in srgb,var(--white) 92%,var(--surface-alt)); }
textarea { min-height:105px; }
.feature-icon,.empty-icon,.role-card-icon,.important-link-icon,.create-chat-icon,.attachment-kind-icon,.lost-placeholder { display:grid; place-items:center; color:var(--primary); background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 14%,var(--white)),var(--white)); border:1px solid color-mix(in srgb,var(--primary) 20%,var(--line)); box-shadow:0 8px 20px color-mix(in srgb,var(--primary) 10%,transparent); }
.feature-icon .ui-icon,.empty-icon .ui-icon,.role-card-icon .ui-icon,.important-link-icon .ui-icon,.create-chat-icon .ui-icon,.attachment-kind-icon .ui-icon,.lost-placeholder .ui-icon { width:52%; height:52%; }
.empty:not(.mini) { min-height:170px; display:grid; place-items:center; align-content:center; gap:7px; border-style:dashed; background:linear-gradient(145deg,color-mix(in srgb,var(--surface-alt) 78%,var(--white)),var(--white)); }
.empty:not(.mini) .empty-icon { width:54px; height:54px; margin:0 0 5px; border-radius:18px; font-size:0; }
.empty:not(.mini) b { color:var(--ink); font-size:14px; }
.empty:not(.mini) > span:last-child { color:var(--muted); font-size:11px; }

/* Main page and plan */
.stats-grid { gap:15px; }
.stat { position:relative; min-height:150px; overflow:hidden; padding:20px; }
.stat::after { content:""; position:absolute; width:100px; height:100px; right:-35px; top:-35px; border-radius:50%; background:color-mix(in srgb,var(--stat-accent,var(--primary)) 9%,transparent); }
.stat:nth-child(2) { --stat-accent:var(--cyan); }.stat:nth-child(3) { --stat-accent:var(--orange); }.stat:nth-child(4) { --stat-accent:#d64f83; }
.stat-icon { width:44px; height:44px; margin-bottom:17px; border:1px solid color-mix(in srgb,var(--stat-accent,var(--primary)) 22%,var(--line)); border-radius:15px; color:var(--stat-accent,var(--primary)); background:color-mix(in srgb,var(--stat-accent,var(--primary)) 11%,var(--white)); }
.stat-icon .ui-icon { width:23px; height:23px; }
.stat strong { font-size:30px; }.stat > span:last-child { font-size:11px; }
.home-block.card,.home-block > .card { overflow:hidden; }
.home-rule-card { min-height:82px; grid-template-columns:45px minmax(0,1fr) 27px; padding:15px; }
.home-rule-card > span { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; color:var(--primary); background:var(--primary-soft); font-size:0; }
.home-rule-card > span .ui-icon { width:22px; height:22px; }
.home-rule-card > i { width:27px; height:27px; display:grid; place-items:center; border-radius:9px; background:var(--surface-alt); font-size:0; }
.home-rule-card > i::after { content:"›"; font-size:18px; }
.quick-row { min-height:58px; padding:10px 12px; border:1px solid transparent; background:color-mix(in srgb,var(--surface-alt) 82%,var(--white)); transition:border-color .18s,transform .18s; }
.quick-row[data-action]:hover { transform:translateX(3px); border-color:color-mix(in srgb,var(--primary) 25%,var(--line)); }
.toolbar { gap:12px; margin-bottom:22px; padding:17px; border-radius:20px; background:color-mix(in srgb,var(--white) 90%,var(--surface-alt)); }
.activity-card { min-height:92px; grid-template-columns:82px minmax(0,1fr) 34px; padding:16px 18px; border-radius:20px; }
.activity-time { min-height:59px; align-content:center; border:1px solid color-mix(in srgb,var(--primary) 16%,transparent); border-radius:17px; background:linear-gradient(145deg,var(--primary-soft),color-mix(in srgb,var(--primary-soft) 60%,var(--white))); }
.activity-time b { font-size:19px; }.activity-time span { margin-top:2px; }
.activity-main h3 { font-size:15px; }.activity-location,.lost-location { display:flex; align-items:center; gap:6px; }.activity-location .ui-icon,.lost-location .ui-icon { width:14px; height:14px; flex:0 0 auto; }
.activity-card .arrow { width:32px; height:32px; display:grid; place-items:center; border-radius:11px; background:var(--surface-alt); }
.activity-card .arrow .ui-icon { width:16px; height:16px; }
.date-heading span { width:42px; height:42px; border:1px solid color-mix(in srgb,var(--primary) 20%,transparent); border-radius:14px; }
.plan-progress { border-radius:22px; box-shadow:var(--card-shadow); }

/* Rating and tasks */
.ranking-hero { min-height:240px; border:0; border-radius:26px; background:radial-gradient(circle at 82% 5%,rgba(88,215,224,.28),transparent 34%),linear-gradient(135deg,#111a3d,#354385); box-shadow:0 24px 55px rgba(17,26,61,.24); }
.podium-place { border:1px solid rgba(255,255,255,.13); backdrop-filter:blur(8px); }
.podium-rank { width:44px; height:44px; display:grid; place-items:center; margin:0 auto; color:#dbe4ff; }.podium-rank .ui-icon,.podium-rank span { grid-area:1/1; }.podium-rank .ui-icon { width:42px; height:42px; stroke-width:1.3; opacity:.72; }.podium-rank span { color:#fff; font-size:12px; font-weight:950; }.podium-place.first .podium-rank { color:var(--yellow); }
.ranking-list { border-radius:22px; }
.ranking-row { min-height:64px; padding:13px 18px; transition:background .18s,transform .18s; }
.ranking-row:hover { transform:translateX(3px); background:color-mix(in srgb,var(--primary-soft) 48%,var(--white)); }
.rank-number { width:36px; height:36px; border-radius:12px; }
.transaction { min-height:62px; }
.task-grid { gap:16px; }
.task-card { position:relative; min-height:190px; overflow:hidden; padding:21px; border-radius:22px; }
.task-card::after { content:""; position:absolute; width:100px; height:100px; right:-36px; top:-36px; border-radius:50%; background:color-mix(in srgb,var(--primary) 8%,transparent); }
.task-top .pill { z-index:1; }.task-number { display:grid; place-items:center; width:35px; height:35px; border-radius:12px; background:var(--primary-soft); }
.deadline { display:flex; align-items:center; gap:7px; }.deadline .ui-icon { width:15px; height:15px; color:var(--primary); }
.leader-row,.leader-task-row { min-height:66px; }.leader-row:hover { transform:none; }
.leader-row > i,.leader-task-row > i { display:grid; place-items:center; }.leader-row > i .ui-icon,.leader-task-row > i .ui-icon { width:16px; height:16px; }

/* Chats */
.chat-layout { border-radius:24px; box-shadow:0 20px 55px rgba(22,34,73,.1); }
.chat-sidebar-head { min-height:70px; padding:15px 18px; }
.thread-item { margin:3px 8px; border-radius:14px; }
.thread-item.active { box-shadow:inset 3px 0 0 var(--primary); }
.chat-head { min-height:70px; padding:12px 18px; }
.chat-empty { min-height:220px !important; border:0; background:transparent !important; box-shadow:none; }
.message-form { border-top-color:var(--modern-line); background:color-mix(in srgb,var(--white) 94%,transparent); backdrop-filter:blur(18px); }
.message-form textarea { border:1px solid var(--modern-line); background:color-mix(in srgb,var(--surface-alt) 78%,var(--white)); }
.composer-tools { border:1px solid var(--modern-line); box-shadow:0 20px 55px rgba(14,22,52,.2); }

/* Knowledge, media and lost items */
.knowledge-hero { border:0; border-radius:27px; background:radial-gradient(circle at 88% 16%,rgba(47,185,197,.35),transparent 31%),linear-gradient(125deg,#131c43,var(--primary-strong)); box-shadow:0 24px 55px rgba(48,39,114,.22); }
.important-link { min-height:82px; display:grid; grid-template-columns:46px minmax(0,1fr) 27px; border-radius:19px; }
.important-link-icon { width:44px; height:44px; border-radius:14px; }
.important-link-arrow { width:17px; height:17px; color:var(--muted); }
.knowledge-tools { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.45fr); gap:12px; padding:17px; border-radius:20px; }
.knowledge-tools input { margin:0; }.knowledge-tools label { margin:0; }
.knowledge-card { position:relative; min-height:225px; overflow:hidden; padding:21px; border-radius:22px; }
.knowledge-card::after { content:""; position:absolute; width:115px; height:115px; right:-45px; top:-45px; border-radius:50%; background:color-mix(in srgb,var(--primary) 7%,transparent); }
.knowledge-icon { width:50px; height:50px; display:grid; place-items:center; margin-bottom:17px; border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line)); border-radius:17px; color:var(--primary); background:var(--primary-soft); }
.knowledge-icon .ui-icon { width:26px; height:26px; }
.storage-card { border-radius:22px; }.storage-bar { height:12px; }
.media-card { border-radius:21px; }.media-preview { background:radial-gradient(circle at 70% 20%,#364784,#141b3c); }.media-info { padding:16px; }
.attachment.video > span { display:flex; align-items:center; gap:7px; }.attachment.video > span .ui-icon { width:16px; height:16px; color:var(--primary); }
.attachment.audio > div { align-items:center; justify-content:flex-start; }.attachment-kind-icon { width:38px; height:38px; flex:0 0 auto; border-radius:12px; }.attachment.audio > div > span:last-child { min-width:0; }
.attachment.document { min-height:60px; border-radius:16px; }.file-symbol { width:40px; height:40px; flex:0 0 auto; border-radius:13px; }.attachment-arrow { width:16px; height:16px; margin-left:auto; color:var(--muted); }
.media-check span { display:flex; align-items:center; gap:7px; }.media-check .ui-icon { width:16px; height:16px; flex:0 0 auto; color:var(--primary); }.media-check b { overflow:hidden; text-overflow:ellipsis; }
.lost-card { border-radius:22px; }.lost-photo { background:radial-gradient(circle at 70% 20%,var(--primary-soft),var(--surface-alt)); }.lost-placeholder { width:76px; height:76px; border-radius:25px; }.lost-body { padding:17px; }

/* Profiles, admin and modal windows */
.profile-card,.profile-settings { border-radius:24px; }.profile-visual { border-width:6px; box-shadow:0 20px 55px rgba(34,54,104,.18); }
.admin-tabs { position:sticky; z-index:5; top:90px; padding:6px; border:1px solid var(--modern-line); background:var(--surface-overlay); backdrop-filter:blur(16px); }
.admin-user { min-height:76px; padding:13px 15px; border-radius:18px; }
.admin-user-actions .button { min-height:34px; }
.channel-admin-avatar { color:var(--primary); background:var(--primary-soft); }.channel-admin-avatar .ui-icon { width:20px; height:20px; }
.access-legend { gap:10px; padding:14px; border-radius:18px; }
.access-legend span { display:flex; align-items:center; gap:6px; min-height:36px; padding:7px 10px; border-radius:11px; background:var(--surface-alt); }.access-legend .ui-icon { width:17px; height:17px; color:var(--primary); }.access-legend b { color:var(--ink); }
.role-card { min-height:205px; padding:19px; border-radius:21px; }.role-card-icon { width:48px; height:48px; border-radius:16px; }.role-card h3 { margin-top:15px; font-size:14px; }
.page-design-row,.page-setting-row,.transfer-grid > .card { border-radius:18px; }
.modal-backdrop { background:rgba(10,15,35,.62); backdrop-filter:blur(10px); }.modal-card { border:1px solid color-mix(in srgb,var(--line) 70%,transparent); border-radius:28px; box-shadow:0 35px 120px rgba(8,12,31,.38); }.modal-close { border:1px solid var(--modern-line); }
.detail { border:1px solid var(--modern-line); border-radius:16px; background:color-mix(in srgb,var(--surface-alt) 75%,var(--white)); }
.create-chat-card { position:relative; min-height:190px; grid-template-columns:58px minmax(0,1fr) 26px; grid-template-rows:auto auto; align-items:center; gap:7px 14px; border-radius:22px; }
.create-chat-icon { grid-row:1 / 3; width:56px; height:56px; border-radius:18px; }.create-chat-card b,.create-chat-card small { grid-column:2; }.create-chat-card b { align-self:end; }.create-chat-card small { align-self:start; }.create-chat-arrow { grid-column:3; grid-row:1 / 3; width:18px; height:18px; color:var(--muted); }

[data-theme="dark"] { --card-shadow:0 14px 38px rgba(0,0,0,.38); --card-shadow-hover:0 22px 55px rgba(0,0,0,.55); --modern-line:color-mix(in srgb,var(--line) 78%,transparent); }
[data-theme="dark"] body { background-image:radial-gradient(circle at 88% 8%,rgba(109,82,237,.13),transparent 25rem),radial-gradient(circle at 18% 72%,rgba(47,185,197,.08),transparent 28rem); }
[data-theme="dark"] .feature-icon,[data-theme="dark"] .empty-icon,[data-theme="dark"] .role-card-icon,[data-theme="dark"] .important-link-icon,[data-theme="dark"] .create-chat-icon,[data-theme="dark"] .attachment-kind-icon,[data-theme="dark"] .lost-placeholder { background:color-mix(in srgb,var(--primary) 18%,var(--white)); }

@media (max-width:760px) {
  body { background-image:none; }
  .content[data-page]:not(.chat-content) { padding-inline:12px; }
  .section-heading { align-items:flex-start; margin:18px 2px 12px; }.section-heading h2 { font-size:19px; }.section-heading p { font-size:11px; }
  .section-heading > .button,.section-heading > div + .button { flex:0 0 auto; }.section-heading .button span { display:none; }
  .topbar-page-icon { width:38px; height:38px; margin-right:9px; border-radius:13px; }.topbar-page-icon .ui-icon { width:19px; height:19px; }
  .stats-grid { gap:10px; }.stat { min-height:135px; padding:16px; }.stat-icon { width:40px; height:40px; margin-bottom:13px; }.stat strong { font-size:25px; }
  .toolbar { grid-template-columns:1fr; gap:10px; padding:13px; }.toolbar .button { width:100%; }
  .activity-card { grid-template-columns:68px minmax(0,1fr); gap:11px; padding:13px; }.activity-time { min-height:55px; }.activity-main h3 { font-size:14px; }
  .ranking-hero { min-height:220px; padding:19px; border-radius:22px; }
  .task-card { min-height:170px; }
  .knowledge-tools { grid-template-columns:1fr; padding:13px; }.knowledge-card { min-height:190px; }.important-link { grid-template-columns:42px minmax(0,1fr) 24px; }
  .admin-tabs { top:75px; }.admin-user { border-radius:17px; }.role-card { min-height:180px; }.access-legend { display:grid; }.access-legend span { width:100%; }
  .chat-layout { border-radius:18px 18px 0 0; }.thread-item { margin-inline:6px; }
  .modal-card { border-radius:26px 26px 0 0; }
  .create-chat-card { min-height:130px; grid-template-columns:48px minmax(0,1fr) 22px; padding:16px; }.create-chat-icon { width:46px; height:46px; border-radius:15px; }
}

