@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap");

/* BLUE STUDIO V5.8 — Cairo typography and Arabic spacing polish
   Loaded last so it can safely refine public, admin and teacher interfaces
   without changing business logic or database behavior. */

:root{
  --blue-font-ar:"Cairo","Segoe UI",Tahoma,Arial,sans-serif;
  --blue-font-en:"Manrope","Segoe UI",Arial,sans-serif;
  --blue-text-leading:1.82;
  --blue-heading-leading:1.34;
}

html{
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

html[lang="ar"] body,
html[dir="rtl"] body,
body[data-force-language="ar"]{
  font-family:var(--blue-font-ar)!important;
  letter-spacing:0;
}

html[lang="en"] body,
html[dir="ltr"] body{
  font-family:var(--blue-font-en)!important;
}

body,button,input,select,textarea{
  font-family:inherit;
}

:is(p,li,dd,small,label,.v4-copy,.admin-title p,.teacher-topbar p){
  text-wrap:pretty;
}

:is(h1,h2,h3,h4,h5,h6,.v4-title,.admin-title h1,.teacher-topbar h1){
  text-wrap:balance;
  overflow-wrap:normal;
  word-break:normal;
}

html[lang="ar"] :is(h1,h2,h3,h4,h5,h6,.v4-title,.v4-page-hero h1,.v4-hero-content h1,.admin-title h1,.teacher-topbar h1){
  letter-spacing:0!important;
}

/* ---------- Public website ---------- */
html[lang="ar"] body.public-v4,
html[dir="rtl"] body.public-v4{
  font-family:var(--blue-font-ar)!important;
  font-size:16px;
  line-height:var(--blue-text-leading);
}

html[lang="en"] body.public-v4,
html[dir="ltr"] body.public-v4{
  font-family:var(--blue-font-en)!important;
}

.public-v4 :is(button,input,select,textarea){
  font-family:inherit!important;
}

html[lang="ar"] .public-v4 .main-nav.v4-nav a{
  font-size:13.5px;
  font-weight:600;
  line-height:1.5;
  letter-spacing:0!important;
  white-space:nowrap;
}

.public-v4 .v4-hero-content h1{
  max-width:850px;
  margin-block:18px 20px;
}

html[lang="ar"] .public-v4 .v4-hero-content h1{
  font-size:clamp(46px,6.4vw,88px);
  line-height:1.22!important;
  font-weight:800;
}

.public-v4 .v4-hero-copy{
  max-width:730px;
  font-size:clamp(16px,1.25vw,19px)!important;
  line-height:1.95!important;
}

html[lang="ar"] .public-v4 .v4-hero-badge,
html[lang="ar"] .public-v4 .v4-kicker{
  letter-spacing:0!important;
  font-weight:700;
  line-height:1.7;
}

.public-v4 .v4-title,
.public-v4 .v4-page-hero h1{
  max-width:900px;
}

html[lang="ar"] .public-v4 .v4-title{
  font-size:clamp(34px,4.2vw,58px);
  line-height:1.3!important;
  font-weight:750;
}

html[lang="ar"] .public-v4 .v4-page-hero h1{
  font-size:clamp(40px,5.4vw,72px);
  line-height:1.28!important;
  font-weight:800;
}

.public-v4 .v4-copy,
.public-v4 .v4-page-hero p,
.public-v4 .v4-feature-copy p,
.public-v4 .v4-cta p{
  line-height:1.95!important;
}

html[lang="ar"] .public-v4 :is(.v4-service-card h3,.v4-package-card h3,.v4-choice-card h3,.v4-feature-copy h2,.v4-booking-step-head h2,.v4-cta h2){
  line-height:1.45!important;
  letter-spacing:0!important;
}

.public-v4 :is(.v4-service-card p,.v4-package-card p,.v4-choice-card p,.v4-mini-list li,.v4-hero-note span,.v4-stat span){
  line-height:1.85!important;
}

html[lang="ar"] .public-v4 :is(.v4-btn,.v4-card-link,.lang-toggle,.v4-rail-button,.v4-book-step-indicator){
  font-weight:650;
  letter-spacing:0!important;
}

.public-v4 .v4-btn{
  min-height:48px;
  padding-inline:22px;
  line-height:1.45;
}

.public-v4 :is(.v4-field label,.v4-form-card label){
  font-size:13px!important;
  font-weight:650!important;
  line-height:1.65!important;
}

.public-v4 :is(.v4-input,.v4-textarea,input,select,textarea){
  font-size:15px;
  line-height:1.6;
}

.public-v4 .v4-booking-step-head{
  gap:10px;
}

.public-v4 .v4-booking-step-head p{
  max-width:720px;
  margin-top:8px;
  line-height:1.9;
}

.public-v4 :is(.v4-choice-card,.v4-package-card,.v4-addon-card){
  text-align:start;
}

.public-v4 :is(.v4-choice-card p,.v4-package-card p,.v4-addon-card p){
  margin-top:7px;
}

.public-v4 :is(.v4-summary-row,.v4-review-list li,.v4-mini-list li){
  font-size:13px;
  line-height:1.75;
}

.public-v4 :is(.v4-price strong,.v4-package-price strong,.v4-summary-total strong,.v4-addon-price,.rental-price,.rental-total,[data-price],[data-total]){
  font-family:var(--blue-font-en)!important;
  font-variant-numeric:tabular-nums;
  direction:ltr;
  unicode-bidi:isolate;
}

.public-v4 .v4-footer,
.public-v4 .v4-footer p,
.public-v4 .v4-footer a{
  line-height:1.85;
}

/* ---------- Admin dashboard ---------- */
html[lang="ar"] .admin-body,
body.admin-body[data-force-language="ar"]{
  font-family:var(--blue-font-ar)!important;
  font-size:14.5px;
  line-height:1.78;
}

html[lang="en"] .admin-body{
  font-family:var(--blue-font-en)!important;
}

.admin-body :is(button,input,select,textarea){
  font-family:inherit!important;
}

.admin-title h1{
  font-size:clamp(24px,2.3vw,31px)!important;
  font-weight:750!important;
  line-height:1.38!important;
  margin:0;
}

.admin-title p{
  max-width:760px;
  margin-top:4px;
  font-size:13px!important;
  line-height:1.78!important;
}

.admin-nav a{
  min-height:50px;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.5!important;
}

.sidebar-promo strong{
  font-size:13px;
  line-height:1.55;
}

.sidebar-promo p{
  font-size:11.5px;
  line-height:1.85!important;
}

.admin-body :is(.card-head h2,.card-head h3,.v56-clean-intro h2,.modal-head h2,.modal-head h3,.v53-content-card h2,.v53-client-library h2){
  line-height:1.5!important;
  letter-spacing:0!important;
}

.admin-body :is(.card-head p,.modal-head p,.v56-clean-intro p,.empty-state p,.v53-help-card p){
  font-size:12px!important;
  line-height:1.85!important;
}

.admin-body .field label{
  font-size:12.5px!important;
  font-weight:650!important;
  line-height:1.65!important;
}

.admin-body .field small{
  font-size:11px!important;
  line-height:1.75!important;
}

.admin-body :is(.input,.select,.textarea,input,select,textarea){
  font-size:13.5px;
  line-height:1.6;
}

.admin-body :is(.btn,.tab-btn,.filter-btn,.icon-btn,.admin-theme-switch button){
  font-weight:650;
  line-height:1.4;
}

.admin-body :is(table,th,td,.data-table,.crm-board,.schedule-board){
  font-size:12px;
  line-height:1.65;
}

.admin-body :is(.metric-value,.kpi-value,.stat-number,.schedule-time,.booking-time,.v56-source-row b,.r54-metric strong){
  font-family:var(--blue-font-en)!important;
  font-variant-numeric:tabular-nums;
}

.user-chip strong{
  font-size:12px;
  line-height:1.4;
}

.user-chip small{
  font-size:10.5px;
  line-height:1.45;
}

/* ---------- Teacher portal ---------- */
html[lang="ar"] body.teacher-body,
html[lang="ar"] body.teacher-login-body,
body.teacher-body[data-force-language="ar"],
body.teacher-login-body[data-force-language="ar"]{
  font-family:var(--blue-font-ar)!important;
  font-size:14.5px;
  line-height:1.8;
}

.teacher-body :is(button,input,select,textarea),
.teacher-login-body :is(button,input,select,textarea){
  font-family:inherit!important;
}

.teacher-topbar h1{
  font-size:clamp(23px,2.4vw,30px)!important;
  font-weight:750;
  line-height:1.45!important;
}

.teacher-topbar p{
  max-width:720px;
  font-size:13px!important;
  line-height:1.8!important;
}

.teacher-nav b,
.teacher-brand span,
.teacher-sidebar-card strong{
  line-height:1.55!important;
}

.teacher-card-head h2,
.teacher-card h2,
.teacher-book-hero h2,
.teacher-login-card h1,
.teacher-login-overlay h2{
  letter-spacing:0!important;
  line-height:1.48!important;
}

.teacher-body :is(.teacher-card p,.teacher-quick-card p,.teacher-next-booking p,.teacher-booking-info p,.teacher-booking-room p,.teacher-empty,.teacher-loading,.teacher-book-hero p),
.teacher-login-body :is(p,small){
  line-height:1.9!important;
}

.teacher-body :is(.teacher-form-grid label,.teacher-account-form label),
.teacher-login-body .teacher-login-form label{
  font-size:12.5px!important;
  font-weight:650!important;
  line-height:1.65!important;
}

.teacher-body :is(input,select,textarea),
.teacher-login-body input{
  font-size:14px!important;
  line-height:1.6;
}

.teacher-primary-btn,.teacher-secondary-btn,.teacher-slot-btn,.teacher-filter-tabs button,.teacher-login-form button{
  font-size:12.5px!important;
  font-weight:650!important;
  line-height:1.45;
}

.teacher-book-table th,
.teacher-book-table td{
  line-height:1.6!important;
}

.teacher-book-table td.time-cell,
.teacher-date-control input,
.teacher-booking-time strong{
  font-family:var(--blue-font-en)!important;
  font-variant-numeric:tabular-nums;
}

/* ---------- Responsive text rhythm ---------- */
@media(max-width:900px){
  html[lang="ar"] .public-v4 .v4-hero-content h1{font-size:clamp(42px,10vw,68px);line-height:1.25!important}
  .public-v4 .v4-section{padding-block:78px}
  .public-v4 .v4-section-head{margin-bottom:30px}
  .admin-title p{max-width:100%}
}

@media(max-width:640px){
  html[lang="ar"] body.public-v4{font-size:15.5px}
  html[lang="ar"] .public-v4 .v4-hero-content h1{font-size:clamp(38px,12vw,54px);line-height:1.3!important}
  html[lang="ar"] .public-v4 .v4-title{font-size:clamp(30px,9vw,42px);line-height:1.35!important}
  html[lang="ar"] .public-v4 .v4-page-hero h1{font-size:clamp(34px,10vw,50px);line-height:1.32!important}
  .public-v4 .v4-hero-copy,.public-v4 .v4-copy{font-size:15.5px!important;line-height:1.95!important}
  .public-v4 .v4-btn{min-height:46px;padding-inline:18px}
  .admin-title h1{font-size:23px!important}
  .admin-title p{font-size:12px!important}
  .teacher-topbar h1{font-size:22px!important}
}

@media(prefers-reduced-motion:reduce){
  *{text-rendering:optimizeLegibility}
}
