/* Reference-driven layout. Presentation only; teacher data and navigation stay in their existing modules. */
.app{background:#f5f8fd;color:#071a4d}
.app .main{width:100%;max-width:1240px;padding:0 28px 20px}
.app .top{display:flex;direction:rtl;align-items:center;justify-content:space-between;gap:16px;min-height:106px;margin:0 0 13px;padding:16px 0 12px;border:0;background:transparent}
.app .top .page-heading{display:flex;align-items:center;gap:12px;flex:none;min-width:0;margin:0}
.app .top .page-heading-text{min-width:0}
.app[data-feature=home] .top .page-heading-text{display:none}
.app .header-home-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:54px;padding:10px 16px;border:0;border-radius:15px;background:#e8f0ff;color:#145bd3;font-size:17px;font-weight:800;box-shadow:none}
.app .header-home-button svg{width:25px;height:25px}
.app .header-home-button:hover,.app .header-home-button.active{background:#dfeaff;color:#0951ca}
.app .top .brand{display:flex;align-items:center;gap:12px;margin:0;padding:0;flex:none}
.app .top .app-brand-logo{width:62px;height:62px;border-radius:17px;box-shadow:0 5px 12px #12387d1c}
.app .top .brand h2{font-size:25px;line-height:1.1;color:#071a4d;white-space:nowrap}
.app .top .brand p{font-size:11px;line-height:1.2;color:#57729f;margin-top:4px;white-space:nowrap}
.app .top .header-national{flex:none;padding:0 12px;border-inline:1px solid #dbe5f4}
.app .top .header-national .kuwait-flag{width:38px;height:24px;border:0;border-radius:0;box-shadow:none}
.app .top .header-national span{display:none}
.app .header-date-chip{display:flex;align-items:center;gap:11px;min-height:58px;padding:8px 14px;border-radius:17px;background:#edf3fc;color:#163e88;white-space:nowrap}
.app .header-date-chip svg{width:26px;height:26px;flex:none;color:#185fcb}
.app .header-date-chip span{display:grid;line-height:1.1;text-align:center}
.app .header-date-chip strong{font-size:15px}
.app .header-date-chip small{font-size:11px;margin-top:3px}
.app .top .header-utilities{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;margin:0}
.app .top .user{display:flex;flex-direction:row-reverse;align-items:center;gap:9px;min-width:0;max-width:230px;padding:8px 10px;border:0;border-radius:16px;background:#edf2fc}
.app .top .user span:last-child{min-width:0}
.app .top .user b,.app .top .user small{display:block;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app .top .user b{font-size:13px;color:#0b255b}
.app .top .user small{font-size:10px;color:#5e76a4}
.app .top .user .avatar{width:38px;height:38px;flex:none;background:linear-gradient(150deg,#4657ef,#8571ff);color:#fff}
.app .top #logoutBtn{min-width:48px;min-height:48px;width:48px;height:48px;border:1px solid #dbe7f5;border-radius:15px;background:#fff;color:#2150a2}
.app .top #saveStatus{max-width:185px;padding:5px 7px;color:#557197;font-size:10px;line-height:1.25;text-align:center}
.app:not([data-feature=home]) .top{min-height:124px}
.app:not([data-feature=home]) .top .page-heading{align-self:flex-start;flex-direction:column;align-items:flex-start}
.app:not([data-feature=home]) .top .page-heading h1{font-size:18px;white-space:normal}
.app #home .daily-welcome,.app #home .weekend-welcome{position:relative;isolation:isolate;display:flex;direction:rtl;align-items:flex-start;justify-content:space-between;gap:20px;min-height:275px;height:275px;margin:0 0 19px;padding:24px 46px;border:2px solid #fff;border-radius:29px;background:#cce8f8 url('kuwait-hero-reference.webp') center center/cover no-repeat;box-shadow:0 8px 20px #306a9b1a;color:#091b66;text-align:center;overflow:hidden}
.app #home .daily-welcome[hidden],.app #home .weekend-welcome[hidden]{display:none!important}
.app #home .daily-welcome::before,.app #home .weekend-welcome::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#eefaffdc 0%,#eefaff9c 19%,transparent 36%,transparent 69%,#eef9ff9c 84%,#eef9ffdb 100%)}
.app #home .daily-welcome::after,.app #home .weekend-welcome::after{display:none}
.app #home .hero-motto{position:relative;z-index:1;flex:0 0 185px;margin-top:2px;color:#08154f;text-shadow:0 1px 5px #fff}
.app #home .hero-motto strong{display:block;font-size:clamp(25px,2.6vw,33px);line-height:1.12}
.app #home .hero-motto small{display:block;margin-top:11px;font-family:Arial,sans-serif;font-size:9px;font-weight:800;line-height:1.1;letter-spacing:.2px}
.app #home .hero-copy{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;flex:0 0 320px;max-width:34%;margin:0;color:#081a66}
.app #home .daily-welcome>.hero-copy{max-width:34%}
.app #home .hero-copy h2{color:#081a66;font-size:clamp(24px,2.7vw,34px);line-height:1.22;margin:0 0 9px;text-shadow:0 1px 6px #fff}
.app #home .daily-welcome-date{display:block;padding:0;margin:0 0 9px;border:0;border-radius:0;background:transparent;color:#224291;font-size:14px;font-weight:700}
.app #home .hero-copy p{color:#102867;font-size:clamp(14px,1.45vw,17px);font-weight:700;line-height:1.55;margin:0;text-shadow:0 1px 4px #fff}
.app #home .hero-copy .daily-welcome-secondary{margin-top:6px;color:#25416f;font-size:12px;font-weight:600}
.app #home .weekend-welcome .hero-copy>span{color:#23448c;font-size:12px;font-weight:700;letter-spacing:0;margin-bottom:9px}
.app #home .weekend-welcome .hero-copy h2{font-size:clamp(24px,2.5vw,32px)}
.app #home .weekend-date{margin:-2px 0 9px;color:#224291;font-size:14px;font-weight:700}
.home-workspace{padding:0}
.workspace-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 2px 15px}
.workspace-title-text h2{position:relative;padding-inline-start:38px;margin:0;color:#081a58;font-size:26px;line-height:1.15}
.workspace-title-text h2::before{content:"▦";position:absolute;right:0;top:-2px;color:#187bd4;font-size:29px}
.workspace-title-text p{margin:3px 38px 0 0;color:#506c9e;font-size:13px}
.workspace-national-ribbon{display:flex;align-items:center;gap:11px;color:#102b60;font-size:15px}
.workspace-national-ribbon .kuwait-flag{width:45px;height:28px;border:0;box-shadow:none}
.workspace-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.workspace-custom-cards{display:contents}
.workspace-card.tone-saved{color:var(--saved-list-color);border-color:color-mix(in srgb,var(--saved-list-color) 35%,white);background:color-mix(in srgb,var(--saved-list-color) 11%,white)}
.workspace-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:185px;padding:20px 17px 27px;border:1.5px solid var(--card-border);border-radius:22px;background:linear-gradient(146deg,var(--card-top),var(--card-bottom));box-shadow:0 7px 15px #153e7710;color:#071a4d;text-align:center;transition:transform .14s ease,box-shadow .14s ease}
.workspace-card:hover{transform:translateY(-3px);box-shadow:0 12px 24px #153e771a}
.workspace-card::after{content:"›";position:absolute;bottom:14px;left:15px;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#fff;color:#102c6d;font:700 30px/1 Arial,sans-serif}
.workspace-card-icon{display:grid;place-items:center;width:62px;height:62px;min-width:62px;padding:0;border-radius:50%;background:#ffffffa6;color:var(--card-accent);font-size:35px;line-height:1}
.workspace-card-icon svg{width:38px;height:38px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
.workspace-card strong{font-size:20px;line-height:1.15;color:#071a4d}
.workspace-card small{color:#405c8a;font-size:12px;line-height:1.4}
.workspace-card .custom-badge{position:absolute;top:12px;right:12px;padding:4px 9px;border:1px solid #ffffffd9;border-radius:99px;background:#ffffffa8;color:#7437c9;font-size:10px;font-weight:800}
.workspace-card.tone-add{border:2px dashed #87c8f4;background:linear-gradient(145deg,#f6fbff,#eaf7ff)}
.workspace-card.tone-add .workspace-card-icon{color:#086ec9}
.app .app-footer{display:block;position:relative;min-height:180px;margin:13px 0 0;padding:36px 8px 12px;border:0;background:url('kuwait-skyline-light.svg') center bottom 18px/100% auto no-repeat;color:#476b9a}
.app .app-footer::before{display:none}
.app .app-footer .footer-top{display:flex;align-items:center;justify-content:center;min-height:98px}
.app .app-footer .footer-quote{font-size:17px;font-weight:700;color:#1c3775}
.app .app-footer .footer-install-slot{position:absolute;right:8px;bottom:39px;z-index:1;display:grid;gap:7px}
.app .app-footer .footer-install-button{display:inline-flex!important;align-items:center;gap:8px;min-height:52px;padding:11px 17px;border:1px solid #d7ddff;border-radius:18px;background:#eef0ff;color:#4b43dc;font-weight:800;box-shadow:0 5px 13px #5869a019}
.app .app-footer .footer-install-button[style*="display: none"]{display:none!important}
.app .app-footer .footer-install-button svg{width:21px;height:21px}
.app .app-footer .footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;font-size:11px}
.app .app-footer .community-count{border:0;padding:0;font-size:10px}
.app .app-footer .community-count>span:first-child{font-size:14px}
.app .app-footer .install-help{max-width:270px;background:#fff;box-shadow:0 4px 12px #183d6a14}
@media(max-width:1080px){
  .app .top{gap:9px}
  .app .top .brand h2{font-size:21px}
  .app .top .app-brand-logo{width:52px;height:52px}
  .app .top .user{max-width:155px}
  .app .top .user b,.app .top .user small{max-width:90px}
  .app .top #saveStatus{max-width:130px}
  .app .header-date-chip{padding:8px 10px}
  .workspace-card{min-height:174px}
}
@media(max-width:850px){
  .app .main{padding-inline:20px}
  .app .top{display:flex;flex-wrap:wrap;min-height:0;gap:10px 15px;padding:15px 0 12px}
  .app .top .page-heading{order:0}
  .app .top .brand{order:1;margin-inline:auto}
  .app .top .header-national{order:2;padding:0;border:0}
  .app .header-date-chip{order:3}
  .app .top .header-utilities{order:4;flex:1}
  .app .top #saveStatus{max-width:155px}
  .app #home .daily-welcome,.app #home .weekend-welcome{height:250px;min-height:250px;padding:21px 26px}
  .app #home .hero-motto{flex-basis:140px}
  .app #home .hero-copy{flex-basis:270px}
  .workspace-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .workspace-card{min-height:170px}
}
@media(max-width:650px){
  .app .main{padding:0 14px 18px}
  .app .top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;min-height:0;margin-bottom:10px;padding:12px 0 10px}
  .app .top .page-heading{grid-column:1;grid-row:1;order:initial;align-self:center}
  .app .header-home-button{min-height:42px;padding:7px 9px;font-size:12px;border-radius:11px}
  .app .header-home-button svg{width:19px;height:19px}
  .app .top .brand{grid-column:2;grid-row:1;order:initial;justify-self:center;gap:6px;margin:0}
  .app .top .app-brand-logo{width:37px;height:37px;border-radius:9px}
  .app .top .brand h2{font-size:15px}
  .app .top .brand p{font-size:8px;margin-top:1px}
  .app .top .header-national{grid-column:3;grid-row:1;order:initial}
  .app .top .header-national .kuwait-flag{width:27px;height:18px}
  .app .header-date-chip{grid-column:1 / 3;grid-row:2;order:initial;justify-self:start;min-height:44px;padding:5px 8px;gap:6px;border-radius:11px}
  .app .header-date-chip svg{width:19px;height:19px}
  .app .header-date-chip strong{font-size:11px}
  .app .header-date-chip small{font-size:9px}
  .app .top .header-utilities{grid-column:3;grid-row:2;order:initial;justify-self:end;gap:5px;width:auto;flex:none}
  .app .top .header-utilities .user{display:flex!important}
  .app .top .user{max-width:100px;min-height:44px;padding:4px 5px;border-radius:11px}
  .app .top .user .avatar{width:28px;height:28px}
  .app .top .user b{font-size:10px;max-width:58px}
  .app .top .user small{display:none}
  .app .top #logoutBtn{width:40px;height:40px;min-width:40px;min-height:40px;border-radius:11px}
  .app .top #saveStatus{position:absolute;top:100%;right:0;width:100%;max-width:none;padding:2px;background:#f5f8fd;text-align:center;font-size:9px}
  .app .top{position:relative;margin-bottom:24px}
  .app:not([data-feature=home]) .top{min-height:115px}
  .app:not([data-feature=home]) .top .page-heading{align-self:start}
  .app:not([data-feature=home]) .top .page-heading-text{position:absolute;right:0;top:82px;white-space:nowrap}
  .app:not([data-feature=home]) .top .page-heading h1{font-size:15px}
  .app #home .daily-welcome,.app #home .weekend-welcome{height:260px;min-height:260px;margin-bottom:16px;padding:18px;border-radius:21px;background-position:50% center}
  .app #home .daily-welcome::before,.app #home .weekend-welcome::before{background:linear-gradient(90deg,#e9f8ffdf 0%,#e9f8ffa6 45%,#e9f8ff35 100%)}
  .app #home .hero-motto{flex-basis:80px;margin:1px 0 0;font-size:10px}
  .app #home .hero-motto strong{font-size:18px}
  .app #home .hero-motto small{font-size:6px;margin-top:5px}
  .app #home .hero-copy{align-self:flex-start;flex-basis:185px;max-width:59%;margin:0}
  .app #home .hero-copy h2{font-size:19px}
  .app #home .daily-welcome-date{font-size:11px}
  .app #home .weekend-date{font-size:11px;margin-bottom:6px}
  .app #home .hero-copy p{font-size:11px;line-height:1.35}
  .app #home .hero-copy .daily-welcome-secondary{font-size:9px}
  .workspace-title{align-items:flex-start;margin-bottom:12px}
  .workspace-title-text h2{font-size:20px;padding-inline-start:28px}
  .workspace-title-text h2::before{font-size:22px}
  .workspace-title-text p{font-size:10px;margin-inline-start:28px}
  .workspace-national-ribbon{max-width:42%;font-size:9px;gap:5px}
  .workspace-national-ribbon .kuwait-flag{width:27px;height:18px}
  .workspace-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .workspace-card{min-height:142px;padding:13px 8px 23px;border-radius:17px;gap:5px}
  .workspace-card-icon{width:43px;height:43px;min-width:43px;font-size:25px}
  .workspace-card-icon svg{width:27px;height:27px}
  .workspace-card strong{font-size:15px}
  .workspace-card small{font-size:10px}
  .workspace-card::after{bottom:8px;left:8px;width:25px;height:25px;font-size:23px}
  .workspace-card .custom-badge{top:6px;right:6px;padding:2px 5px;font-size:8px}
  .app .app-footer{min-height:150px;margin-top:10px;padding-top:20px;background-size:auto 86px}
  .app .app-footer .footer-top{min-height:70px}
  .app .app-footer .footer-quote{font-size:12px}
  .app .app-footer .footer-install-slot{right:5px;bottom:33px}
  .app .app-footer .footer-install-button{min-height:40px;padding:7px 10px;font-size:11px;border-radius:12px}
  .app .app-footer .footer-bottom{font-size:9px}
  .app .app-footer .community-count{display:none}
}
@media(max-width:365px){
  .app .top .brand p{display:none}
  .app .header-home-button span{display:none}
  .app .top .header-utilities .user{display:none!important}
  .workspace-card{min-height:132px}
  .workspace-national-ribbon strong{display:none}
}
@media print{.app .top,.app .app-footer,.home-workspace{display:none!important}}
