/* Darsara Portal — polished Persian RTL interface */
:root {
  --ds-ink: #182536;
  --ds-muted: #778397;
  --ds-soft: #f4f7f9;
  --ds-white: #fff;
  --ds-teal: #21b99a;
  --ds-teal-strong: #118b78;
  --ds-teal-pale: #e3f7f2;
  --ds-orange: #ffad72;
  --ds-navy: #102033;
  --ds-line: #e9edf1;
  --ds-blue: #627fe9;
  --ds-red: #dc6565;
  --ds-shadow: 0 18px 48px rgba(28, 43, 59, .08);
}

/* Shared pieces */
.ds-icon { display: inline-flex; width: 1.2rem; height: 1.2rem; flex: 0 0 auto; align-items: center; justify-content: center; }
.ds-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ds-btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .72rem 1.05rem; border: 1px solid transparent; border-radius: 13px; background: var(--ds-teal); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.ds-btn:hover { color: #fff; background: var(--ds-teal-strong); transform: translateY(-1px); box-shadow: 0 9px 22px rgba(33, 185, 154, .2); }
.ds-btn--soft { background: var(--ds-teal-pale); color: var(--ds-teal-strong); }
.ds-btn--soft:hover { background: #d2f0e8; color: var(--ds-teal-strong); box-shadow: none; }
.ds-btn--outline { background: transparent; color: var(--ds-ink); border-color: var(--ds-line); }
.ds-btn--outline:hover { background: #fff; color: var(--ds-ink); box-shadow: none; }
.ds-btn--small { min-height: 36px; padding: .45rem .75rem; font-size: .83rem; border-radius: 10px; }
.ds-eyebrow { color: var(--ds-teal-strong); font-size: .76rem; font-weight: 900; letter-spacing: .04em; }
.ds-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.ds-section-heading h2 { margin: 0; color: var(--ds-ink); font-size: 1.2rem; line-height: 1.4; }
.ds-section-heading p { margin: .3rem 0 0; color: var(--ds-muted); font-size: .88rem; }
.ds-section-heading a { color: var(--ds-teal-strong); font-size: .83rem; font-weight: 800; text-decoration: none; }
.ds-card { min-width: 0; border: 1px solid var(--ds-line); border-radius: 18px; background: var(--ds-white); box-shadow: 0 6px 22px rgba(25, 42, 59, .035); }
.ds-alert { display: flex; align-items: flex-start; gap: .65rem; margin: 0 0 1rem; padding: .8rem .9rem; border: 1px solid #f2d6d4; border-radius: 13px; background: #fff4f3; color: #a94949; font-size: .87rem; }
.ds-alert--success { border-color: #cbeadd; background: #effaf5; color: #287a5f; }
.ds-alert--info { border-color: #d7e4f4; background: #f3f8ff; color: #426b9e; }
.ds-empty { padding: 1.5rem; border: 1px dashed #d9e1e8; border-radius: 16px; color: var(--ds-muted); text-align: center; background: rgba(255,255,255,.66); }
.ds-empty strong { display: block; margin-bottom: .25rem; color: var(--ds-ink); }
.ds-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; background: #f1f3f6; color: #69778a; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.ds-pill--teal { background: var(--ds-teal-pale); color: var(--ds-teal-strong); }
.ds-pill--orange { background: #fff2e7; color: #bb6b37; }
.ds-pill--blue { background: #edf0ff; color: #5e6fc2; }
.ds-pill--red { background: #fff0ee; color: #b8544b; }
.ds-arrow-link { display: inline-flex; gap: .45rem; align-items: center; color: var(--ds-teal-strong); font-size: .82rem; font-weight: 850; text-decoration: none; }
.ds-arrow-link:hover { color: #0c705f; }

/* Welcome / login screen */
.ds-login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .95fr) minmax(480px, 1.05fr); background: #f4f6f8; overflow: hidden; }
.ds-login-story { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(2rem, 5vw, 4.2rem); overflow: hidden; background: radial-gradient(circle at 15% 82%, rgba(37, 192, 161, .22), transparent 26%), radial-gradient(circle at 90% 7%, rgba(87, 115, 178, .28), transparent 27%), linear-gradient(145deg, #112238 0%, #102033 53%, #172b3d 100%); color: #fff; }
.ds-login-story::before, .ds-login-story::after { position: absolute; z-index: -1; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none; }
.ds-login-story::before { width: min(39vw, 490px); aspect-ratio: 1; inset-inline-start: -12%; inset-block-end: 7%; box-shadow: 0 0 0 34px rgba(255,255,255,.018), 0 0 0 70px rgba(255,255,255,.018), 0 0 0 110px rgba(255,255,255,.014); }
.ds-login-story::after { width: 260px; aspect-ratio: 1; inset-inline-end: -80px; inset-block-start: 22%; background: radial-gradient(circle, rgba(33,185,154,.12), transparent 70%); }
.ds-login-brand, .ds-brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.ds-brand-mark { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 16px; color: #092821; background: linear-gradient(145deg, #6de0c1, #20b99a); font-size: 1.3rem; font-weight: 1000; box-shadow: 0 8px 24px rgba(32,185,154,.21); }
.ds-login-brand__text strong, .ds-brand__text strong { display: block; font-size: 1.05rem; line-height: 1.25; }
.ds-login-brand__text span, .ds-brand__text span { display: block; margin-top: .12rem; color: rgba(255,255,255,.6); font-size: .72rem; }
.ds-login-story__center { position: relative; max-width: 570px; margin: 3rem auto; }
.ds-login-story__kicker { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.35rem; padding: .42rem .8rem; border: 1px solid rgba(127,232,203,.23); border-radius: 999px; background: rgba(48,199,163,.09); color: #8ce7ce; font-size: .77rem; font-weight: 800; }
.ds-login-story__kicker::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: #72e5c4; box-shadow: 0 0 0 5px rgba(114,229,196,.12); }
.ds-login-story h1 { max-width: 560px; margin: 0; color: #fff; font-size: clamp(2.2rem, 5.1vw, 4.1rem); line-height: 1.19; letter-spacing: -.045em; }
.ds-login-story h1 span { color: #75dfc2; }
.ds-login-story__copy { max-width: 440px; margin: 1.2rem 0 0; color: rgba(236,244,251,.69); font-size: 1rem; }
.ds-login-art { position: relative; width: min(100%, 400px); height: 178px; margin: 2.1rem 0 0; }
.ds-login-art__ring { position: absolute; inset-inline-start: 20px; inset-block-start: 8px; width: 162px; height: 162px; border: 1px solid rgba(123,226,200,.28); border-radius: 50%; box-shadow: 0 0 0 20px rgba(255,255,255,.018), 0 0 0 42px rgba(255,255,255,.016); }
.ds-login-art__tile { position: absolute; z-index: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.1); box-shadow: 0 18px 42px rgba(0,0,0,.16); backdrop-filter: blur(12px); }
.ds-login-art__tile--main { inset-inline-start: 65px; inset-block-start: 30px; width: 92px; height: 92px; border-radius: 30px; color: #73e1c2; transform: rotate(-9deg); }
.ds-login-art__tile--main svg { width: 43px; height: 43px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.ds-login-art__tile--small { width: 51px; height: 51px; border-radius: 18px; color: #ffd098; font-size: 1.4rem; }
.ds-login-art__tile--one { inset-inline-start: 205px; inset-block-start: 6px; transform: rotate(8deg); }
.ds-login-art__tile--two { inset-inline-start: 229px; inset-block-start: 88px; color: #a8bdff; transform: rotate(-7deg); }
.ds-login-art__floating { position: absolute; inset-inline-start: 0; inset-block-end: 4px; z-index: 2; display: flex; align-items: center; gap: .55rem; padding: .62rem .78rem; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(255,255,255,.09); color: rgba(255,255,255,.88); font-size: .72rem; backdrop-filter: blur(8px); }
.ds-login-art__floating i { width: 8px; height: 8px; border-radius: 99px; background: #69dfbd; box-shadow: 0 0 0 5px rgba(105,223,189,.12); }
.ds-login-story__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: rgba(255,255,255,.48); font-size: .73rem; }
.ds-login-story__foot strong { color: rgba(255,255,255,.75); font-weight: 700; }
.ds-login-panel { display: grid; place-items: center; padding: clamp(1.3rem, 5vw, 4.5rem); background: radial-gradient(circle at 72% 21%, rgba(211,242,232,.37), transparent 28%), #f5f7f8; }
.ds-auth-card { width: min(100%, 438px); padding: clamp(1.6rem, 4vw, 2.45rem); border: 1px solid rgba(221,228,234,.8); border-radius: 25px; background: rgba(255,255,255,.88); box-shadow: 0 22px 70px rgba(31,51,69,.08); }
.ds-auth-card__mobile-brand { display: none; }
.ds-auth-card__eyebrow { margin: 0 0 .45rem; color: var(--ds-teal-strong); font-size: .77rem; font-weight: 900; }
.ds-auth-card h2 { margin: 0; color: var(--ds-ink); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.35; }
.ds-auth-card__intro { margin: .65rem 0 1.7rem; color: var(--ds-muted); font-size: .9rem; }
.ds-login-form { display: grid; gap: 1rem; }
.ds-field { display: grid; gap: .4rem; }
.ds-field label { color: #314154; font-size: .82rem; font-weight: 850; }
.ds-field__hint { color: #8993a3; font-size: .72rem; }
.ds-input-wrap { position: relative; }
.ds-input, .ds-select, .ds-textarea { width: 100%; min-height: 49px; padding: .78rem .9rem; border: 1px solid #e2e8ed; border-radius: 12px; outline: 0; background: #fcfdfd; color: var(--ds-ink); font-size: .9rem; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.ds-input:focus, .ds-select:focus, .ds-textarea:focus { border-color: #7ed5c2; background: #fff; box-shadow: 0 0 0 4px rgba(33,185,154,.11); }
.ds-input::placeholder, .ds-textarea::placeholder { color: #a4aebb; }
.ds-input-wrap .ds-input { padding-inline-end: 2.85rem; }
.ds-input-wrap__icon { position: absolute; inset-inline-end: .95rem; inset-block-start: 50%; color: #9aa6b3; transform: translateY(-50%); }
.ds-password-toggle { position: absolute; inset-inline-start: .65rem; inset-block-start: 50%; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #8490a0; cursor: pointer; transform: translateY(-50%); }
.ds-password-toggle:hover { background: #f0f4f5; color: var(--ds-teal-strong); }
.ds-form-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: -.1rem; color: var(--ds-muted); font-size: .78rem; }
.ds-check { display: inline-flex; align-items: center; gap: .48rem; cursor: pointer; }
.ds-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ds-teal); }
.ds-form-row a { color: var(--ds-teal-strong); text-decoration: none; font-weight: 800; }
.ds-login-submit { width: 100%; min-height: 51px; margin-top: .25rem; border-radius: 13px; font-size: .9rem; }
.ds-login-submit .ds-icon { transition: transform .2s ease; }
.ds-login-submit:hover .ds-icon { transform: translateX(-3px); }
.ds-login-security { display: flex; align-items: center; gap: .55rem; margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid #edf0f2; color: #8490a0; font-size: .72rem; }
.ds-login-security .ds-icon { color: var(--ds-teal-strong); }
.ds-login-help { margin: 1rem 0 0; color: #99a2ae; font-size: .72rem; text-align: center; }
.ds-login-help strong { color: #707d8e; }

/* Portal application frame */
.ds-app { min-height: 100vh; background: #f5f7f9; color: var(--ds-ink); }
.ds-sidebar { position: fixed; z-index: 40; inset-block: 0; inset-inline-start: 0; display: flex; flex-direction: column; width: 264px; padding: 1.45rem 1.1rem 1rem; overflow-y: auto; background: var(--ds-navy); color: #fff; }
.ds-sidebar .ds-brand { padding: .15rem .3rem 1.55rem; }
.ds-sidebar .ds-brand-mark { width: 43px; height: 43px; border-radius: 14px; font-size: 1.18rem; }
.ds-sidebar .ds-brand__text strong { color: #fff; }
.ds-sidebar .ds-brand__text span { color: rgba(255,255,255,.5); }
.ds-sidebar__label { margin: .55rem .65rem .65rem; color: rgba(255,255,255,.38); font-size: .67rem; font-weight: 900; letter-spacing: .08em; }
.ds-nav { display: grid; gap: .3rem; }
.ds-nav a { display: flex; align-items: center; gap: .78rem; min-height: 45px; padding: .66rem .78rem; border: 1px solid transparent; border-radius: 12px; color: rgba(255,255,255,.65); font-size: .84rem; font-weight: 700; text-decoration: none; transition: background .2s ease, color .2s ease; }
.ds-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.ds-nav a.is-active { border-color: rgba(86,219,184,.12); color: #93ebd2; background: linear-gradient(100deg, rgba(30,179,148,.2), rgba(30,179,148,.08)); }
.ds-nav a .ds-icon { width: 19px; height: 19px; color: #9cabb9; }
.ds-nav a.is-active .ds-icon { color: #78dfc3; }
.ds-sidebar__spacer { flex: 1; min-height: 2rem; }
.ds-sidebar__classbox { margin: 1.05rem 0 .8rem; padding: .95rem; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.025)); }
.ds-sidebar__classbox strong { display: block; color: #fff; font-size: .8rem; }
.ds-sidebar__classbox p { margin: .25rem 0 .75rem; color: rgba(255,255,255,.54); font-size: .72rem; }
.ds-sidebar__classbox a { display: inline-flex; gap: .35rem; align-items: center; color: #8ce4cb; font-size: .72rem; font-weight: 800; text-decoration: none; }
.ds-sidebar__logout { display: flex; align-items: center; gap: .72rem; min-height: 44px; padding: .6rem .75rem; border-radius: 11px; color: rgba(255,255,255,.65); font-size: .81rem; font-weight: 700; text-decoration: none; }
.ds-sidebar__logout:hover { color: #fff; background: rgba(255,255,255,.07); }
.ds-sidebar__logout .ds-icon { color: #b5c0cb; }
.ds-main { min-height: 100vh; margin-inline-start: 264px; }
.ds-topbar { position: sticky; z-index: 30; inset-block-start: 0; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; min-height: 74px; padding: .7rem clamp(1.1rem, 3vw, 2.5rem); border-bottom: 1px solid rgba(227,232,237,.85); background: rgba(255,255,255,.89); backdrop-filter: blur(14px); }
.ds-topbar__left, .ds-topbar__right { display: flex; align-items: center; gap: .85rem; }
.ds-topbar__title { color: #718094; font-size: .82rem; }
.ds-topbar__title strong { color: var(--ds-ink); font-size: .93rem; }
.ds-topbar__divider { width: 1px; height: 24px; background: #e5e9ed; }
.ds-topbar__date { color: #8793a2; font-size: .77rem; }
.ds-user { display: flex; align-items: center; gap: .65rem; padding-inline-start: .9rem; border-inline-start: 1px solid #e8ecef; }
.ds-user__avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: #dff5ee; color: #137e6b; font-weight: 900; }
.ds-user__name { display: block; max-width: 180px; overflow: hidden; color: #24354a; font-size: .79rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.ds-user__meta { display: block; color: #94a0ad; font-size: .67rem; }
.ds-menu-toggle { display: none; width: 40px; height: 40px; place-items: center; border: 1px solid var(--ds-line); border-radius: 11px; background: #fff; color: var(--ds-ink); cursor: pointer; }
.ds-content { max-width: 1540px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.45rem); }
.ds-content__intro { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.35rem; }
.ds-content__intro h1 { margin: .18rem 0 0; color: #18283a; font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.35; letter-spacing: -.025em; }
.ds-content__intro p { margin: .35rem 0 0; color: var(--ds-muted); font-size: .88rem; }
.ds-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .6rem; color: #96a0ad; font-size: .74rem; }
.ds-breadcrumb a { color: #718193; text-decoration: none; }
.ds-breadcrumb span { color: #c0c8d0; }
.ds-back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--ds-teal-strong); font-size: .8rem; font-weight: 800; text-decoration: none; }

/* Hero and metrics */
.ds-welcome { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .45fr); align-items: center; min-height: 208px; padding: clamp(1.4rem, 3vw, 2.1rem); border-radius: 22px; overflow: hidden; color: #fff; background: radial-gradient(circle at 4% 5%, rgba(94,231,192,.24), transparent 26%), linear-gradient(112deg, #137b70, #159b84 48%, #22b89a); box-shadow: 0 14px 34px rgba(20,143,123,.18); }
.ds-welcome::before { position: absolute; content: ""; width: 280px; height: 280px; inset-inline-end: 21%; inset-block-start: -195px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255,255,255,.035), 0 0 0 60px rgba(255,255,255,.025); }
.ds-welcome::after { position: absolute; content: ""; width: 190px; height: 190px; inset-inline-end: 1%; inset-block-end: -126px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.ds-welcome__copy { position: relative; z-index: 2; max-width: 680px; }
.ds-welcome__eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .55rem; color: rgba(255,255,255,.76); font-size: .74rem; font-weight: 800; }
.ds-welcome h1 { margin: 0; color: #fff; font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.35; }
.ds-welcome p { max-width: 540px; margin: .55rem 0 1.05rem; color: rgba(255,255,255,.75); font-size: .85rem; }
.ds-welcome .ds-btn { min-height: 39px; padding: .55rem .85rem; border-color: rgba(255,255,255,.18); background: #fff; color: #12836f; font-size: .78rem; }
.ds-welcome .ds-btn:hover { background: #eafaf4; color: #0e6c5b; }
.ds-welcome__art { position: relative; z-index: 1; display: grid; place-items: center; min-height: 160px; }
.ds-welcome__book { position: relative; display: grid; place-items: center; width: 122px; height: 122px; border: 1px solid rgba(255,255,255,.43); border-radius: 34px; background: rgba(255,255,255,.14); box-shadow: 0 22px 50px rgba(0,70,55,.17); transform: rotate(-8deg); backdrop-filter: blur(8px); }
.ds-welcome__book svg { width: 62px; height: 62px; fill: none; stroke: #e0fff4; stroke-width: 1.25; }
.ds-welcome__spark { position: absolute; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 15px; background: rgba(255,255,255,.2); color: #fff; font-size: 1.15rem; }
.ds-welcome__spark--one { inset-inline-start: 13%; inset-block-start: 14%; width: 43px; height: 43px; transform: rotate(10deg); }
.ds-welcome__spark--two { inset-inline-end: 13%; inset-block-end: 9%; width: 36px; height: 36px; color: #ffe4b5; transform: rotate(-10deg); }
.ds-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .85rem; margin-top: 1rem; }
.ds-stat { display: flex; align-items: center; gap: .85rem; min-height: 89px; padding: 1rem; border: 1px solid var(--ds-line); border-radius: 17px; background: #fff; }
.ds-stat__icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 auto; border-radius: 14px; color: var(--ds-teal-strong); background: #e6f7f2; }
.ds-stat:nth-child(2) .ds-stat__icon { color: #6879d8; background: #eef0ff; }
.ds-stat:nth-child(3) .ds-stat__icon { color: #cc854f; background: #fff1e6; }
.ds-stat:nth-child(4) .ds-stat__icon { color: #498eaa; background: #eaf6fa; }
.ds-stat__value { display: block; color: var(--ds-ink); font-size: 1.25rem; font-weight: 950; line-height: 1.2; }
.ds-stat__label { display: block; margin-top: .28rem; color: #8995a4; font-size: .72rem; }

/* Lists and cards */
.ds-grid { display: grid; gap: .9rem; }
.ds-grid--classes { grid-template-columns: repeat(3, minmax(0,1fr)); }
.ds-grid--two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ds-class-card { position: relative; padding: 1.12rem; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.ds-class-card:hover { transform: translateY(-3px); box-shadow: var(--ds-shadow); }
.ds-class-card__top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.ds-class-card__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #e4f6f0; color: #168b76; }
.ds-class-card:nth-child(3n+2) .ds-class-card__mark { background: #eef0ff; color: #6877cf; }
.ds-class-card:nth-child(3n) .ds-class-card__mark { background: #fff2e6; color: #ca8450; }
.ds-class-card h3 { margin: .9rem 0 .2rem; color: #233449; font-size: .96rem; }
.ds-class-card p { margin: 0; color: #8a96a4; font-size: .75rem; }
.ds-class-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid #f0f2f4; }
.ds-class-card__foot span { color: #8793a2; font-size: .72rem; }
.ds-class-card__foot a { color: var(--ds-teal-strong); font-size: .75rem; font-weight: 850; text-decoration: none; }
.ds-list { display: grid; gap: .65rem; }
.ds-list-card { display: flex; align-items: center; gap: .85rem; padding: .88rem; border: 1px solid var(--ds-line); border-radius: 15px; background: #fff; transition: border-color .15s ease, transform .15s ease; }
.ds-list-card:hover { border-color: #b5e4d8; transform: translateY(-1px); }
.ds-list-card__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; background: #edf8f5; color: #238d79; }
.ds-list-card__icon--assignment { background: #fff2e8; color: #c77843; }
.ds-list-card__body { flex: 1; min-width: 0; }
.ds-list-card__body h3 { overflow: hidden; margin: 0; color: #243449; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.ds-list-card__body p { margin: .18rem 0 0; color: #929dab; font-size: .69rem; }
.ds-list-card__end { display: flex; align-items: center; gap: .6rem; }
.ds-list-card__end .ds-arrow-link { white-space: nowrap; }
.ds-resource-type { color: #8a97a5; font-size: .69rem; }
.ds-resource-card { padding: 1rem; }
.ds-resource-card h3 { margin: .72rem 0 .3rem; color: #213248; font-size: .92rem; }
.ds-resource-card p { margin: 0; color: #8793a2; font-size: .76rem; }
.ds-resource-card__meta { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .85rem; padding-top: .72rem; border-top: 1px solid #eef1f3; }
.ds-assignment-card { padding: 1rem; }
.ds-assignment-card__top { display: flex; justify-content: space-between; align-items: start; gap: .75rem; }
.ds-assignment-card h3 { margin: 0; color: #223449; font-size: .9rem; }
.ds-assignment-card p { margin: .35rem 0 0; color: #8995a4; font-size: .75rem; }
.ds-assignment-card__meta { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid #eff1f3; color: #8b97a5; font-size: .72rem; }
.ds-class-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: clamp(1.15rem, 3vw, 1.8rem); border: 1px solid #e3efeb; border-radius: 19px; background: linear-gradient(110deg, #fff, #f0faf6); }
.ds-class-hero h1 { margin: .35rem 0 .1rem; color: #1d3042; font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.ds-class-hero p { margin: .2rem 0 0; color: #7d8b99; font-size: .82rem; }
.ds-class-hero__badge { display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 auto; border-radius: 21px; background: #e0f5ed; color: #138671; font-size: 1.6rem; }
.ds-lesson { max-width: 940px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--ds-line); border-radius: 19px; background: #fff; }
.ds-lesson h1 { margin: .55rem 0 .3rem; color: #1d3043; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.4; }
.ds-lesson__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.ds-lesson__body { color: #45566a; line-height: 2; }
.ds-lesson__body h2, .ds-lesson__body h3 { color: #203247; }
.ds-lesson__body img { border-radius: 13px; }
.ds-lesson__body table { width: 100%; border-collapse: collapse; }
.ds-lesson__body td, .ds-lesson__body th { padding: .55rem; border: 1px solid var(--ds-line); }
.ds-lesson__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid #eef0f2; }
.ds-assignment-detail { max-width: 900px; margin: 0 auto; }
.ds-assignment-detail__body { padding: 1.3rem; border: 1px solid var(--ds-line); border-radius: 18px; background: #fff; color: #495a6c; line-height: 1.95; }
.ds-submission-box { margin-top: 1rem; padding: 1.25rem; border: 1px solid #dceee8; border-radius: 18px; background: #f7fcfa; }
.ds-submission-box h2 { margin: 0 0 .7rem; color: #203548; font-size: 1rem; }
.ds-upload-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .8rem 0; padding: .85rem; border: 1px dashed #b7d9ce; border-radius: 13px; background: #fff; }
.ds-upload-zone input[type=file] { max-width: 100%; color: #758294; font-size: .77rem; }
.ds-upload-zone__hint { color: #98a2ae; font-size: .69rem; }
.ds-submission-history { display: grid; gap: .65rem; margin-top: 1rem; }
.ds-submission-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border: 1px solid #e8eeeb; border-radius: 12px; background: #fff; }
.ds-submission-row__name { min-width: 0; }
.ds-submission-row__name strong { display: block; overflow: hidden; color: #2c3e51; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.ds-submission-row__name span { color: #8a96a3; font-size: .68rem; }
.ds-feedback { margin-top: .75rem; padding: .75rem; border-radius: 11px; background: #f1f6ff; color: #566d8b; font-size: .8rem; }
.ds-feedback strong { display: block; margin-bottom: .2rem; color: #354f70; }
.ds-grade { display: inline-flex; align-items: center; gap: .3rem; color: #16846f; font-weight: 900; }
.ds-admin-note { margin-top: 1rem; padding: .85rem 1rem; border: 1px solid #dbe5f1; border-radius: 13px; background: #f6f9fd; color: #64778e; font-size: .8rem; }
.ds-page-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.2rem; }
.ds-overlay { display: none; }

/* Admin import screen */
.ds-admin-wrap { max-width: 1120px; }
.ds-admin-wrap h1 { margin-bottom: .35rem; }
.ds-admin-lead { max-width: 780px; margin: 0 0 1.3rem; color: #657386; }
.ds-admin-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr); gap: 1rem; }
.ds-admin-card { padding: 1.25rem; border: 1px solid #e0e5ea; border-radius: 14px; background: #fff; box-shadow: 0 3px 13px rgba(20,40,60,.035); }
.ds-admin-card h2 { margin: 0 0 .7rem; font-size: 1.05rem; }
.ds-admin-card p { color: #68778a; }
.ds-admin-card code { direction: ltr; display: inline-block; padding: .1rem .35rem; border-radius: 4px; background: #f2f4f6; }
.ds-admin-card .ds-btn { border: 0; }
.ds-admin-example { width: 100%; border-collapse: collapse; direction: rtl; }
.ds-admin-example th, .ds-admin-example td { padding: .55rem; border-bottom: 1px solid #edf0f3; text-align: right; font-size: .8rem; }
.ds-admin-example th { color: #647386; background: #f7f9fa; }
.ds-admin-results { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.ds-admin-results th, .ds-admin-results td { padding: .55rem; border-bottom: 1px solid #edf0f3; text-align: right; font-size: .8rem; vertical-align: top; }
.ds-admin-results th { color: #647386; background: #f7f9fa; }
.ds-admin-results code { direction: ltr; display: inline-block; }

@media (max-width: 1100px) {
  .ds-grid--classes { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ds-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .ds-login-layout { grid-template-columns: minmax(0, .88fr) minmax(390px, 1.12fr); }
  .ds-login-story { padding: 2rem; }
  .ds-login-story h1 { font-size: clamp(2rem, 4.7vw, 3.2rem); }
  .ds-login-art { transform: scale(.88); transform-origin: right center; }
  .ds-sidebar { transform: translateX(110%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(0,0,0,.14); }
  .ds-sidebar.is-open { transform: translateX(0); }
  .ds-main { margin-inline-start: 0; }
  .ds-menu-toggle { display: grid; }
  .ds-overlay { position: fixed; z-index: 35; inset: 0; display: block; visibility: hidden; background: rgba(12,24,36,.45); opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
  .ds-overlay.is-visible { visibility: visible; opacity: 1; }
}
@media (max-width: 720px) {
  .ds-login-layout { display: flex; flex-direction: column; min-height: 100vh; }
  .ds-login-story { min-height: 300px; padding: 1.5rem 1.35rem; }
  .ds-login-story__center { margin: 2rem 0 1.2rem; }
  .ds-login-story h1 { max-width: 480px; font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .ds-login-story__copy { max-width: 450px; margin-top: .65rem; font-size: .82rem; }
  .ds-login-art { position: absolute; inset-inline-end: -4.5rem; inset-block-end: -.8rem; width: 260px; height: 140px; margin: 0; opacity: .64; transform: scale(.7); transform-origin: right bottom; }
  .ds-login-story__foot { font-size: .66rem; }
  .ds-login-panel { flex: 1; padding: 1.1rem; }
  .ds-auth-card { width: min(100%, 500px); padding: 1.5rem; border-radius: 21px; }
  .ds-auth-card__mobile-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.3rem; }
  .ds-auth-card__mobile-brand .ds-brand-mark { width: 37px; height: 37px; border-radius: 12px; font-size: 1rem; }
  .ds-auth-card__mobile-brand strong { display: block; color: var(--ds-ink); font-size: .85rem; }
  .ds-auth-card__mobile-brand span { display: block; color: #8b96a5; font-size: .65rem; }
  .ds-grid--classes, .ds-grid--two { grid-template-columns: 1fr; }
  .ds-welcome { grid-template-columns: 1fr; min-height: 200px; }
  .ds-welcome__art { position: absolute; inset-inline-end: -35px; inset-block-end: -15px; width: 180px; opacity: .5; }
  .ds-welcome__copy { max-width: 82%; }
  .ds-topbar { min-height: 64px; padding: .55rem 1rem; }
  .ds-topbar__date, .ds-topbar__divider { display: none; }
  .ds-user__meta { display: none; }
  .ds-user { padding-inline-start: .55rem; }
  .ds-content { padding: 1.1rem .9rem 1.8rem; }
  .ds-content__intro { align-items: flex-start; flex-direction: column; }
  .ds-stats { gap: .55rem; }
  .ds-stat { min-height: 77px; gap: .6rem; padding: .7rem; }
  .ds-stat__icon { width: 37px; height: 37px; border-radius: 12px; }
  .ds-stat__value { font-size: 1.05rem; }
  .ds-stat__label { font-size: .64rem; }
  .ds-section-heading { align-items: flex-start; }
  .ds-section-heading h2 { font-size: 1.05rem; }
  .ds-section-heading p { font-size: .75rem; }
  .ds-list-card { gap: .6rem; padding: .72rem; }
  .ds-list-card__end .ds-resource-type { display: none; }
  .ds-list-card__end { gap: .4rem; }
  .ds-list-card__end .ds-arrow-link { font-size: .72rem; }
  .ds-assignment-card__meta { align-items: flex-start; flex-direction: column; }
  .ds-class-hero { align-items: flex-start; }
  .ds-class-hero__badge { width: 54px; height: 54px; border-radius: 17px; }
  .ds-submission-row { align-items: flex-start; flex-direction: column; }
  .ds-admin-grid { grid-template-columns: 1fr; }
  .ds-admin-results { min-width: 620px; }
  .ds-admin-results-wrap { overflow-x: auto; }
}
@media (max-width: 420px) {
  .ds-login-story { min-height: 280px; }
  .ds-login-story__foot span:first-child { display: none; }
  .ds-login-art { opacity: .42; }
  .ds-form-row { align-items: flex-start; flex-direction: column; }
  .ds-stat { gap: .45rem; }
  .ds-stat__icon { width: 33px; height: 33px; }
  .ds-stat__label { line-height: 1.4; }
  .ds-list-card__icon { width: 37px; height: 37px; }
}
@media print {
  .ds-sidebar, .ds-topbar, .ds-page-actions, .ds-login-layout { display: none !important; }
  .ds-main { margin: 0; }
  .ds-content { padding: 0; }
  .ds-card, .ds-lesson { box-shadow: none; }
}
