/* ================================================================
   Control Escolar — App Styles
   Misma gama de colores que GestionMX
   Poppins · teal accent #0d9488
================================================================ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
  display: block;
}

input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 !important;
  overflow: hidden !important;
  background: #000;
  touch-action: pan-y;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #111 !important;
  -webkit-font-smoothing: antialiased;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ── CSS Variables (mismas que GestionMX) ── */
:root {
  --primary:      #0d9488;
  --primary-dark: #0f766e;
  --primary-rgb:  13, 148, 136;

  --gmx-primary:               #303e51;
  --gmx-secondary:             #006c4a;
  --gmx-surface:               #faf8ff;
  --gmx-surface-container:     #eaedff;
  --gmx-surface-container-low: #f2f3ff;
  --gmx-surface-lowest:        #ffffff;
  --gmx-on-surface:            #131b2e;
  --gmx-on-surface-variant:    #44474c;
  --gmx-outline:               #75777d;
  --gmx-outline-variant:       #c4c6cd;
  --gmx-error:                 #ba1a1a;
  --gmx-error-container:       #ffdad6;
  --gmx-secondary-container:   #82f5c1;
  --gmx-on-secondary-container:#00714e;
  --gmx-primary-fixed:         #d5e3fc;
  --gmx-on-primary-fixed:      #0d1c2e;
}

/* ── Safe area helpers ── */
@supports (padding: max(0px)) {
  .safe-top    { padding-top: env(safe-area-inset-top); }
  .safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
}

/* =====================================
   SPLASH / GLOBAL LOADER
===================================== */

#splash {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 9999;
}

.loader-ios {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.08);
  border-top: 3px solid #0d9488;
  animation: loaderSpin .8s linear infinite;
}

#splash .loader-ios {
  width: 36px;
  height: 36px;
}

.loader-text {
  font-size: 13px;
  color: #9ca3af;
  letter-spacing: .2px;
}

#splash.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s ease;
}

@keyframes loaderSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================================
   APP CONTAINER
===================================== */

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--gmx-surface, #faf8ff);
}

/* =====================================
   VIEW TRANSITIONS
===================================== */

.view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(30px) scale(.97);
  transition: opacity .32s ease, transform .32s ease;
}

.view.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.view-entering {
  animation: viewEnter .56s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================
   TOAST NOTIFICATIONS
===================================== */

.toast-container {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom), 24px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 99999;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.toast {
  background: #1f2937;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastIn .3s ease forwards;
  text-align: center;
}

.toast.danger  { background: #dc2626; }
.toast.success { background: var(--gmx-secondary); }
.toast.warning { background: #d97706; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================
   LOGIN SCREEN
===================================== */

.login-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.login-box {
  text-align: center;
  width: 100%;
  max-width: 340px;
  padding: 24px;
}

.login-logo {
  width: 90px;
  height: 90px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--gmx-primary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(13,148,136,0.25);
}

.login-logo i {
  font-size: 40px;
  color: #fff;
  pointer-events: none;
}

.login-box h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gmx-on-surface);
  margin-bottom: 4px;
}

.login-subtitle {
  margin-bottom: 32px;
  color: var(--gmx-on-surface-variant);
  font-size: 14px;
}

/* Login screen buttons */
.login-screen .btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.login-screen .btn:active { transform: scale(0.96); }

.btn-google {
  background: #ffffff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.btn-worker {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb !important;
}

.btn-primary-dark {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: none;
  background: var(--gmx-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  margin-top: 8px;
  box-shadow: 0 8px 20px rgba(48,62,81,.25);
  transition: .2s;
  cursor: pointer;
  width: 100%;
}

.btn-primary-dark:active { transform: scale(.97); }

.btn-social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Login divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  color: #bbb;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Role selector (first login) */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.role-card {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  background: #fff;
}

.role-card:active { transform: scale(.96); }

.role-card.selected {
  border-color: var(--primary);
  background: rgba(13,148,136,0.05);
}

.role-card i {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--gmx-primary);
  pointer-events: none;
}

.role-card span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gmx-on-surface);
}

/* Login worker form */
.login-worker-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gmx-on-surface);
  text-align: left;
}

.login-back-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--gmx-on-surface-variant);
  cursor: pointer;
  padding: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  display: block;
}

.login-field {
  margin-bottom: 14px;
  text-align: left;
}

.login-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gmx-on-surface-variant);
  margin-bottom: 6px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.login-field-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gmx-outline-variant);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  color: var(--gmx-on-surface);
  background: #fff;
  outline: none;
  transition: border-color .2s;
}

.login-field-input:focus { border-color: var(--primary); }

.login-field-input-wrap {
  position: relative;
}

.login-field-input.has-eye { padding-right: 46px; }

.login-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gmx-outline);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.login-error {
  background: rgba(186,26,26,.07);
  border: 1px solid rgba(186,26,26,.2);
  border-radius: 10px;
  color: var(--gmx-error);
  font-size: 13px;
  padding: 10px 14px;
  margin-top: 10px;
  text-align: center;
}

/* Login overlay (blocking) */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity .25s ease;
  touch-action: none;
}

.login-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.login-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 26px;
  border-radius: 22px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(255,255,255,0.6);
  animation: fadeInScale .3s ease;
}

.login-loading-text {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  opacity: .75;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.splash-footer {
  position: absolute;
  bottom: max(env(safe-area-inset-bottom), 20px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #d1d5db;
  letter-spacing: .03em;
}

/* =====================================
   LOGIN SUCCESS ANIMATION
===================================== */

.login-success {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.login-success .success-icon {
  position: relative;
  z-index: 10;
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--gmx-primary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .4s ease, transform .5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 16px 40px rgba(13,148,136,0.3);
}

.login-success .success-icon i {
  font-size: 40px;
  color: #fff;
  pointer-events: none;
}

.login-success.show .success-icon {
  opacity: 1;
  transform: scale(1);
}

.login-success.fadeout {
  opacity: 0;
  transition: opacity .4s ease;
}

/* Pulse ring */
.login-success .pulse-ring {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: rgba(13,148,136,0.15);
  animation: pulseRing 1.2s ease-out infinite;
}

@keyframes pulseRing {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* =====================================
   DASHBOARD LAYOUT (all roles)
===================================== */

.ce-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--gmx-surface);
  overflow: hidden;
}

/* Top nav */
.ce-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  padding-top: max(env(safe-area-inset-top), 12px);
  padding-bottom: 10px;
  background: var(--gmx-surface-lowest);
  border-bottom: 1px solid var(--gmx-outline-variant);
  flex-shrink: 0;
}

.ce-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--gmx-primary);
  letter-spacing: -.3px;
}

.ce-topnav-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gmx-on-surface-variant);
}

.ce-nav-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: var(--gmx-surface-container-low);
  color: var(--gmx-on-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s;
}

.ce-nav-icon-btn:active { background: var(--gmx-surface-container); }

/* Content area */
.ce-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: max(env(safe-area-inset-bottom), 80px);
}

/* Bottom nav */
.ce-bottomnav {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: var(--gmx-surface-lowest);
  border-top: 1px solid var(--gmx-outline-variant);
  padding-bottom: max(env(safe-area-inset-bottom), 6px);
  padding-top: 6px;
  flex-shrink: 0;
}

.ce-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gmx-outline);
  transition: color .2s;
  font-family: 'Poppins', sans-serif;
}

.ce-nav-item i {
  font-size: 22px;
  transition: color .2s;
}

.ce-nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
}

.ce-nav-item.active {
  color: var(--primary);
}

/* =====================================
   CARD COMPONENTS
===================================== */

.ce-card {
  background: var(--gmx-surface-lowest);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 12px;
}

.ce-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gmx-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}

/* Stat cards grid */
.ce-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.ce-stat-card {
  background: var(--gmx-surface-lowest);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ce-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gmx-on-surface);
  line-height: 1;
}

.ce-stat-label {
  font-size: 12px;
  color: var(--gmx-on-surface-variant);
  font-weight: 500;
}

.ce-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
}

.ce-stat-icon.teal    { background: rgba(13,148,136,.1);  color: var(--primary); }
.ce-stat-icon.blue    { background: rgba(48,62,81,.1);    color: var(--gmx-primary); }
.ce-stat-icon.green   { background: rgba(0,108,74,.1);    color: var(--gmx-secondary); }
.ce-stat-icon.amber   { background: rgba(217,119,6,.1);   color: #d97706; }
.ce-stat-icon.red     { background: rgba(186,26,26,.1);   color: var(--gmx-error); }

/* Greeting header */
.ce-greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--gmx-on-surface);
  margin-bottom: 4px;
  line-height: 1.2;
}

.ce-greeting-sub {
  font-size: 13px;
  color: var(--gmx-on-surface-variant);
  margin-bottom: 20px;
}

/* List items */
.ce-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gmx-outline-variant);
  cursor: pointer;
  transition: opacity .2s;
}

.ce-list-item:last-child { border-bottom: none; }
.ce-list-item:active { opacity: .7; }

.ce-list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gmx-surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gmx-primary);
  flex-shrink: 0;
}

.ce-list-item-body {
  flex: 1;
  min-width: 0;
}

.ce-list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gmx-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ce-list-item-sub {
  font-size: 12px;
  color: var(--gmx-on-surface-variant);
}

.ce-list-item-chevron {
  font-size: 14px;
  color: var(--gmx-outline);
  flex-shrink: 0;
}

/* Badge / chips */
.ce-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.ce-badge.green  { background: rgba(0,108,74,.1);    color: var(--gmx-secondary); }
.ce-badge.teal   { background: rgba(13,148,136,.1);  color: var(--primary); }
.ce-badge.amber  { background: rgba(217,119,6,.1);   color: #d97706; }
.ce-badge.red    { background: rgba(186,26,26,.1);   color: var(--gmx-error); }
.ce-badge.blue   { background: rgba(48,62,81,.1);    color: var(--gmx-primary); }

/* Avatar */
.ce-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gmx-primary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.ce-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Section divider */
.ce-section-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--gmx-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 16px 0 8px;
}

/* Empty state */
.ce-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gmx-on-surface-variant);
}

.ce-empty i {
  font-size: 48px;
  opacity: .3;
  margin-bottom: 12px;
  pointer-events: none;
}

.ce-empty p {
  font-size: 14px;
}

/* Content entering animation */
.ce-content-entering {
  animation: contentEnter .4s ease forwards;
}

@keyframes contentEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =====================================
   GRADE CIRCLES
===================================== */

.grade-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.grade-circle.pass   { background: rgba(0,108,74,.1);  color: var(--gmx-secondary); }
.grade-circle.warn   { background: rgba(217,119,6,.1); color: #d97706; }
.grade-circle.fail   { background: rgba(186,26,26,.1); color: var(--gmx-error); }

/* =====================================
   ATTENDANCE INDICATOR
===================================== */

.attendance-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.attendance-dot.present   { background: var(--gmx-secondary); }
.attendance-dot.absent    { background: var(--gmx-error); }
.attendance-dot.late      { background: #d97706; }
.attendance-dot.excused   { background: var(--primary); }

/* =====================================
   PROFILE / SETTINGS
===================================== */

.ce-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
}

.ce-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gmx-primary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  overflow: hidden;
}

.ce-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ce-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--gmx-on-surface);
  margin-bottom: 2px;
}

.ce-profile-role {
  font-size: 13px;
  color: var(--gmx-on-surface-variant);
}

/* Logout button */
.btn-logout {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(186,26,26,.3);
  background: rgba(186,26,26,.05);
  color: var(--gmx-error);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-logout:active { transform: scale(.98); }

/* =====================================
   ADMIN QUICK ACTIONS GRID
===================================== */

.ce-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.ce-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--gmx-surface-lowest);
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ce-quick-btn:active { transform: scale(.95); }

.ce-quick-btn i {
  font-size: 24px;
  color: var(--gmx-primary);
  pointer-events: none;
}

.ce-quick-btn span {
  font-size: 11px;
  font-weight: 600;
  color: var(--gmx-on-surface-variant);
  text-align: center;
  line-height: 1.2;
}

/* =====================================
   SCHEDULE TABLE
===================================== */

.ce-schedule-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gmx-outline-variant);
}

.ce-schedule-row:last-child { border-bottom: none; }

.ce-schedule-time {
  flex-shrink: 0;
  width: 60px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gmx-on-surface-variant);
  padding-top: 2px;
}

.ce-schedule-body {
  flex: 1;
  padding: 10px 14px;
  background: var(--gmx-surface-container-low);
  border-radius: 12px;
  border-left: 3px solid var(--primary);
}

.ce-schedule-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--gmx-on-surface);
}

.ce-schedule-detail {
  font-size: 12px;
  color: var(--gmx-on-surface-variant);
  margin-top: 2px;
}

/* =====================================
   PERMISSIONS ONBOARDING
===================================== */

.permissions-screen {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(env(safe-area-inset-top), 24px) 24px max(env(safe-area-inset-bottom), 24px);
  background:
    radial-gradient(circle at top, rgba(13,148,136,.10), transparent 35%),
    linear-gradient(180deg, #ffffff, #f5f7fb);
}

.permissions-shell { width: 100%; max-width: 380px; }

.permissions-topbar { margin-bottom: 14px; }

.permissions-step-label {
  margin-top: 8px;
  text-align: right;
  font-size: 12px;
  color: #8b93a1;
}

.permissions-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e9edf3;
  overflow: hidden;
}

.permissions-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  transition: width .35s ease;
}

.permissions-card {
  width: 100%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 50px rgba(15,23,42,.08), 0 8px 20px rgba(15,23,42,.05);
  border: 1px solid rgba(255,255,255,.85);
}

.permissions-card.accent-notifications { box-shadow: 0 24px 50px rgba(245,158,11,.09), 0 8px 20px rgba(245,158,11,.05); }
.permissions-card.accent-camera        { box-shadow: 0 24px 50px rgba(168,85,247,.09), 0 8px 20px rgba(168,85,247,.05); }
.permissions-card.accent-calendar      { box-shadow: 0 24px 50px rgba(13,148,136,.09), 0 8px 20px rgba(13,148,136,.05); }
.permissions-card.accent-contacts      { box-shadow: 0 24px 50px rgba(8,145,178,.09),  0 8px 20px rgba(8,145,178,.05);  }

.perm-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.perm-icon-wrap {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(13,148,136,.22), rgba(13,148,136,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.perm-icon { font-size: 42px; }

.permissions-card h2 { font-size: 24px; line-height: 1.15; margin-bottom: 10px; color: #111827; }

.perm-desc {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
  min-height: 42px;
}

.perm-state {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.perm-state-text { font-size: 14px; line-height: 1.45; color: #4b5563; }

.perm-loading-wrap, .perm-error-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.perm-error-icon { font-size: 28px; }

.perm-actions { display: flex; flex-direction: column; gap: 10px; }

.perm-btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 16px;
  background: var(--gmx-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(48,62,81,.2);
  transition: .2s;
}

.perm-btn-primary:active  { transform: scale(.97); }
.perm-btn-primary:disabled { opacity: .6; }

.perm-btn-secondary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: #f3f6fa;
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
}

.perm-btn-secondary:disabled { opacity: .6; }

.perm-btn-settings {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(190,24,93,.12);
  border-radius: 16px;
  background: #fff1f2;
  color: #be123c;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
}

.perm-btn-settings.hidden { display: none; }
