/* UMBRELLAHTECH SMS & LMS - modern design layer.
   Colours, fonts and the options below are set from Appearance & Themes.
   Admin rules apply only on plugin screens (body.uht-screen); front-end rules only on pages with a plugin shortcode (body.uht-front). */

:root{--uht-radius:12px;--uht-radius-sm:8px;--uht-pad:18px;--uht-shadow:0 10px 28px rgba(15,23,42,.08),0 2px 6px rgba(15,23,42,.05)}

/* ---- Corners, spacing, card styles ---- */
.uht-r-sharp{--uht-radius:4px;--uht-radius-sm:3px}
.uht-r-soft{--uht-radius:12px;--uht-radius-sm:8px}
.uht-r-round{--uht-radius:22px;--uht-radius-sm:14px}
.uht-d-compact{--uht-pad:12px}
.uht-d-default{--uht-pad:18px}
.uht-d-spacious{--uht-pad:26px}
.uht-card-flat{--uht-shadow:none}
.uht-card-elevated{--uht-shadow:0 10px 28px rgba(15,23,42,.08),0 2px 6px rgba(15,23,42,.05)}
.uht-card-glass{--uht-shadow:0 8px 32px rgba(15,23,42,.12)}
.uht-card-accent{--uht-shadow:0 4px 14px rgba(15,23,42,.06)}

/* ---- Background patterns (set a variable; applied below) ---- */
.uht-bg-plain{--uht-bgshort:var(--uht-bg)}
.uht-bg-mist{--uht-bgshort:linear-gradient(180deg,var(--uht-tint) 0,var(--uht-bg) 460px) var(--uht-bg)}
.uht-bg-aurora{--uht-bgshort:radial-gradient(900px 480px at 0 0,var(--uht-soft),transparent 70%),radial-gradient(800px 420px at 100% 0,var(--uht-tint),transparent 70%),var(--uht-bg)}
.uht-bg-dots{--uht-bgshort:radial-gradient(var(--uht-soft) 1.4px,transparent 1.5px) 0 0/22px 22px,var(--uht-bg)}
.uht-bg-grid{--uht-bgshort:linear-gradient(var(--uht-soft) 1px,transparent 1px) 0 0/30px 30px,linear-gradient(90deg,var(--uht-soft) 1px,transparent 1px) 0 0/30px 30px,var(--uht-bg)}
.uht-bg-ripples{--uht-bgshort:repeating-radial-gradient(circle at 100% 0,transparent 0 34px,var(--uht-tint) 34px 36px),var(--uht-bg)}
.uht-bg-stripes{--uht-bgshort:repeating-linear-gradient(135deg,var(--uht-tint) 0 12px,transparent 12px 24px),var(--uht-bg)}

body.uht-screen #wpcontent,.uht-preview-stage{background:var(--uht-bgshort,var(--uht-bg))}
body.uht-screen #wpcontent{min-height:calc(100vh - 32px)}
body.uht-screen #wpbody-content{background:transparent}
body.uht-front .uht-portal,body.uht-front .uht-form-container,body.uht-front .uht-terminal,body.uht-front .uht-app,body.uht-front .uht-dashboard,body.uht-front .uht-assignment-list{background:var(--uht-bgshort,var(--uht-bg));border-radius:var(--uht-radius);color:var(--uht-text)}

/* ---- Typography ---- */
body.uht-screen #wpcontent,body.uht-screen .wrap,body.uht-front .uht-portal,body.uht-front .uht-form-container,body.uht-front .uht-terminal,body.uht-front .uht-app,body.uht-front .uht-dashboard{font-family:var(--uht-font,inherit)}
body.uht-screen .wrap>h1,body.uht-screen .wrap h1.wp-heading-inline{font-weight:700;letter-spacing:-.01em;color:var(--uht-text);position:relative;padding-bottom:10px}
body.uht-screen .wrap>h1::after{content:"";position:absolute;left:0;bottom:0;width:54px;height:4px;border-radius:4px;background:linear-gradient(90deg,var(--uht-primary),var(--uht-accent))}
body.uht-screen .wrap h2{color:var(--uht-text);font-weight:650;letter-spacing:-.005em}
body.uht-screen a{color:var(--uht-link)}
.uht-muted{color:var(--uht-muted)}

/* ---- Cards and panels ---- */
body.uht-screen .uht-panel,body.uht-screen .postbox,body.uht-front .uht-card,body.uht-front .uht-dashboard-card,.uht-preview-card{background:var(--uht-panel);border:1px solid var(--uht-border);border-radius:var(--uht-radius);box-shadow:var(--uht-shadow);color:var(--uht-text)}
body.uht-screen .uht-panel{padding:var(--uht-pad)}
.uht-card-glass .uht-panel,.uht-card-glass .uht-stat,.uht-card-glass .uht-preview-card,.uht-card-glass.uht-front .uht-card{background:var(--uht-glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.uht-card-accent .uht-panel,.uht-card-accent .uht-preview-card{border-left:4px solid var(--uht-primary)}
.uht-stat{background:var(--uht-panel);border-radius:var(--uht-radius);box-shadow:var(--uht-shadow);transition:transform .15s ease,box-shadow .15s ease}
.uht-stat:hover{transform:translateY(-2px)}
.uht-stat strong{color:var(--uht-text)}
.uht-stat small{color:var(--uht-muted);text-transform:uppercase;letter-spacing:.05em;font-weight:600}

/* ---- Dashboard banner ---- */
.uht-dashboard-v280 .uht-hero,.uht-preview-hero{background:var(--uht-hero)!important;position:relative;overflow:hidden;border-radius:calc(var(--uht-radius) + 4px)!important}
.uht-dashboard-v280 .uht-hero::before,.uht-preview-hero::before{content:"";position:absolute;right:-70px;top:-80px;width:240px;height:240px;border-radius:50%;background:rgba(255,255,255,.10);pointer-events:none}
.uht-dashboard-v280 .uht-hero::after,.uht-preview-hero::after{content:"";position:absolute;right:130px;bottom:-90px;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.07);pointer-events:none}
.uht-dashboard-v280 .uht-hero>*,.uht-preview-hero>*{position:relative;z-index:1}

/* ---- Buttons and form controls ---- */
body.uht-screen .button,body.uht-screen .button-secondary{border-radius:var(--uht-radius-sm);border-color:var(--uht-border);color:var(--uht-link)}
body.uht-screen .button-primary,body.uht-screen .button-primary:visited{background:var(--uht-primary);border-color:var(--uht-primary);color:#fff;border-radius:var(--uht-radius-sm);box-shadow:0 2px 0 rgba(0,0,0,.10);text-shadow:none;transition:background .15s ease,transform .1s ease}
body.uht-screen .button-primary:hover,body.uht-screen .button-primary:focus{background:var(--uht-primary-hover);border-color:var(--uht-primary-hover);color:#fff}
body.uht-screen .button-primary:active{transform:translateY(1px)}
.uht-btn{background:var(--uht-primary);border-radius:var(--uht-radius-sm)}
.uht-btn:hover,.uht-btn:focus{background:var(--uht-primary-hover)}
body.uht-screen input[type=text],body.uht-screen input[type=email],body.uht-screen input[type=url],body.uht-screen input[type=number],body.uht-screen input[type=date],body.uht-screen input[type=password],body.uht-screen input[type=search],body.uht-screen input[type=tel],body.uht-screen select,body.uht-screen textarea,
body.uht-front .uht-form-container input,body.uht-front .uht-form-container select,body.uht-front .uht-form-container textarea{border-radius:var(--uht-radius-sm);border:1px solid var(--uht-border)}
body.uht-screen input:focus,body.uht-screen select:focus,body.uht-screen textarea:focus,
body.uht-front .uht-form-container input:focus,body.uht-front .uht-form-container select:focus,body.uht-front .uht-form-container textarea:focus{border-color:var(--uht-primary);box-shadow:0 0 0 3px var(--uht-soft);outline:0}

/* ---- Tables ---- */
body.uht-screen .widefat{border-radius:var(--uht-radius);overflow:hidden;border-color:var(--uht-border);box-shadow:var(--uht-shadow)}
body.uht-screen .widefat thead th,body.uht-screen .widefat tfoot th{background:var(--uht-tint);color:var(--uht-muted);text-transform:uppercase;font-size:11.5px;letter-spacing:.05em;border-bottom:1px solid var(--uht-border)}
body.uht-screen .widefat td{border-color:var(--uht-border)}
body.uht-screen .striped>tbody>:nth-child(odd){background:var(--uht-tint)}
.uht-table th{background:var(--uht-tint);color:var(--uht-muted)}
.uht-table th,.uht-table td{border-color:var(--uht-border)}
.uht-chip{display:inline-block;padding:3px 11px;border-radius:999px;background:var(--uht-soft);color:var(--uht-link);font-weight:600;font-size:12.5px}
.uht-chip.warn{background:#fef3c7;color:#92400e}

/* ---- Chart widgets ---- */
.uht-snapshot{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px;margin:6px 0 4px}
.uht-snapshot .uht-panel{margin:0}
.uht-donut-wrap{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.uht-donut{width:132px;height:132px;border-radius:50%;position:relative;flex:0 0 auto}
.uht-donut::after{content:"";position:absolute;inset:22px;border-radius:50%;background:var(--uht-panel)}
.uht-donut b{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;font-size:21px;font-weight:700;color:var(--uht-text)}
.uht-legend{list-style:none;margin:0;padding:0}
.uht-legend li{display:flex;align-items:center;gap:8px;margin:6px 0;color:var(--uht-text)}
.uht-legend i{width:11px;height:11px;border-radius:50%;flex:0 0 auto}
.uht-legend strong{margin-left:auto;padding-left:12px}
.uht-progress{height:14px;background:var(--uht-soft);border-radius:999px;overflow:hidden}
.uht-progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--uht-primary),var(--uht-accent))}

/* ---- Appearance settings page ---- */
.uht-appearance-page .uht-theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin:10px 0 24px}
.uht-appearance-page .uht-theme-card{display:flex;flex-direction:column;gap:6px;padding:10px 10px 12px;background:#fff;border:2px solid #dbe4f0;border-radius:14px;cursor:pointer;transition:border-color .15s ease,transform .15s ease}
.uht-appearance-page .uht-theme-card:hover{transform:translateY(-2px)}
.uht-appearance-page .uht-theme-card input{position:absolute;opacity:0;pointer-events:none}
.uht-appearance-page .uht-theme-card.is-selected,.uht-appearance-page .uht-theme-card:has(input:checked){border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.18)}
.uht-appearance-page .uht-theme-banner{display:block;height:46px;border-radius:9px}
.uht-appearance-page .uht-theme-swatches{display:flex;gap:6px}
.uht-appearance-page .uht-theme-swatches i{width:22px;height:22px;border-radius:50%;border:1px solid rgba(0,0,0,.12)}
.uht-appearance-page .uht-theme-card strong{color:#172033}
.uht-appearance-page .uht-theme-card small{color:#64748b}
.uht-bg-grid-wrap,.uht-appearance-page .uht-bg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;margin:10px 0 24px}
.uht-appearance-page .uht-bg-card{display:flex;flex-direction:column;gap:6px;padding:8px;background:#fff;border:2px solid #dbe4f0;border-radius:12px;cursor:pointer}
.uht-appearance-page .uht-bg-card input{position:absolute;opacity:0;pointer-events:none}
.uht-appearance-page .uht-bg-card.is-selected,.uht-appearance-page .uht-bg-card:has(input:checked){border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.18)}
.uht-bg-chip{display:block;height:64px;border-radius:8px;border:1px solid var(--uht-border);background:var(--uht-bgshort,var(--uht-bg))}
.uht-preview-stage{padding:22px;border:1px solid var(--uht-border);border-radius:calc(var(--uht-radius) + 4px);color:var(--uht-text);max-width:980px}
.uht-preview-hero{display:flex;flex-direction:column;gap:4px;padding:22px;color:#fff;margin-bottom:16px}
.uht-preview-hero strong{font-size:22px;color:#fff}
.uht-preview-hero span{opacity:.85}
.uht-preview-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin-bottom:16px}
.uht-preview-card{padding:var(--uht-pad);display:flex;flex-direction:column;gap:4px}
.uht-preview-card small{color:var(--uht-muted);font-weight:600;letter-spacing:.05em}
.uht-preview-card strong{font-size:24px;color:var(--uht-text)}
.uht-preview-card span{color:var(--uht-muted);font-size:12px}
.uht-preview-row{display:flex;gap:28px;flex-wrap:wrap;align-items:center}
.uht-preview-actions{flex:1 1 240px}
.uht-preview-btn{display:inline-block;padding:8px 16px;border-radius:var(--uht-radius-sm);background:var(--uht-primary);color:#fff;font-weight:600}
.uht-preview-btn.ghost{background:transparent;border:1px solid var(--uht-border);color:var(--uht-link)}

/* ---- Dark mode toggle for light schemes ---- */
body.uht-dark-mode:not(.uht-dark-pack){--uht-bg:#0f172a;--uht-panel:#1e293b;--uht-text:#e2e8f0;--uht-muted:#94a3b8;--uht-border:#334155;--uht-tint:#172033;--uht-soft:#1e3a5f;--uht-link:#93c5fd;--uht-glass:rgba(255,255,255,.06)}
body.uht-dark-mode:not(.uht-dark-pack).uht-screen #wpcontent,body.uht-dark-mode:not(.uht-dark-pack).uht-screen .wrap{color:var(--uht-text)}

@media (max-width:600px){.uht-donut{width:112px;height:112px}.uht-donut::after{inset:19px}.uht-preview-stage{padding:14px}}
@media (prefers-reduced-motion:reduce){.uht-stat,.uht-appearance-page .uht-theme-card,body.uht-screen .button-primary{transition:none}}

/* ---- Front-end: login, staff application and role dashboard ---- */
.uht-login-panel{max-width:560px;margin:28px auto;padding:calc(var(--uht-pad) + 12px);background:var(--uht-panel)!important;border:1px solid var(--uht-border);border-radius:calc(var(--uht-radius) + 4px);box-shadow:var(--uht-shadow);position:relative;overflow:hidden;color:var(--uht-text);font-family:var(--uht-font,inherit)}
.uht-login-panel.uht-wide{max-width:780px}
.uht-login-panel::before{content:"";position:absolute;left:0;right:0;top:0;height:6px;background:var(--uht-hero)}
.uht-login-panel h2{margin:8px 0 6px;font-size:24px;color:var(--uht-text)}
.uht-login-panel h3{margin:22px 0 6px;padding-bottom:6px;border-bottom:2px solid var(--uht-soft);color:var(--uht-text);font-size:16px}
.uht-login-panel label{display:block;font-weight:600;color:var(--uht-text)}
.uht-login-panel input[type=text],.uht-login-panel input[type=email],.uht-login-panel input[type=password],.uht-login-panel input[type=tel],.uht-login-panel input[type=number],.uht-login-panel input[type=date],.uht-login-panel select,.uht-login-panel textarea{width:100%;box-sizing:border-box;margin-top:4px;padding:10px 12px;font:inherit;background:var(--uht-bg);color:var(--uht-text);border:1px solid var(--uht-border);border-radius:var(--uht-radius-sm)}
.uht-login-panel input[type=file]{margin-top:4px;max-width:100%}
.uht-login-panel input:focus,.uht-login-panel select:focus,.uht-login-panel textarea:focus{outline:0;border-color:var(--uht-primary);box-shadow:0 0 0 3px var(--uht-soft)}
.uht-login-panel .login-remember label{display:flex;align-items:center;gap:8px;font-weight:500}
.uht-login-panel .button-primary,.uht-login-panel button[type=submit],.uht-login-panel input[type=submit]{width:100%;padding:12px 16px;font:inherit;font-weight:700;color:#fff;background:var(--uht-primary);border:0;border-radius:var(--uht-radius-sm);cursor:pointer;transition:background .15s ease,transform .1s ease}
.uht-login-panel .button-primary:hover,.uht-login-panel button[type=submit]:hover,.uht-login-panel input[type=submit]:hover{background:var(--uht-primary-hover)}
.uht-login-panel .button-primary:active,.uht-login-panel button[type=submit]:active{transform:translateY(1px)}
.uht-login-panel a{color:var(--uht-link)}
.uht-login-links{margin:14px 0 0;text-align:center;color:var(--uht-muted)}
.uht-login-panel .uht-alert,.uht-alert{padding:12px 14px;border-radius:var(--uht-radius-sm);margin:12px 0;font-weight:500}
.uht-alert-bad{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.uht-alert-ok{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}
.uht-btn{display:inline-block;padding:10px 18px;color:#fff!important;font-weight:700;text-decoration:none;border-radius:var(--uht-radius-sm)}
.uht-link{margin-left:10px}

.uht-role-dashboard{padding:var(--uht-pad);color:var(--uht-text)}
.uht-role-dashboard .uht-portal-head{background:var(--uht-hero);color:#fff;border-radius:calc(var(--uht-radius) + 4px);padding:22px;margin-bottom:16px;position:relative;overflow:hidden}
.uht-role-dashboard .uht-portal-head h2,.uht-role-dashboard .uht-portal-head p{color:#fff;margin:0}
.uht-role-dashboard .uht-portal-head p{opacity:.9;margin-top:4px}
.uht-role-dashboard .uht-portal-head::after{content:"";position:absolute;right:-50px;top:-60px;width:200px;height:200px;border-radius:50%;background:rgba(255,255,255,.1)}
.uht-dashboard-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin:12px 0}
.uht-role-dashboard .uht-dashboard-card{padding:var(--uht-pad);transition:transform .15s ease,box-shadow .15s ease;position:relative}
.uht-role-dashboard .uht-dashboard-card:hover{transform:translateY(-3px)}
.uht-card-icon{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:var(--uht-soft);font-size:21px;margin-bottom:8px}
.uht-role-dashboard .uht-dashboard-card h3{margin:0 0 4px;font-size:16px;color:var(--uht-text)}
.uht-role-dashboard .uht-dashboard-card p{margin:0 0 6px;color:var(--uht-muted);font-size:13.5px}
.uht-card-link{font-weight:700;text-decoration:none;color:var(--uht-link)}
.uht-dashboard-logout{text-align:right;margin-top:10px}
@media (max-width:600px){.uht-login-panel{margin:12px;padding:var(--uht-pad)}.uht-dashboard-grid{grid-template-columns:1fr}}

/* ---- School branding on public panels ---- */
.uht-brand{display:flex;align-items:center;gap:12px;margin:6px 0 4px}
.uht-brand-logo{width:48px;height:48px;object-fit:contain;border-radius:var(--uht-radius-sm);background:var(--uht-panel)}
.uht-brand-name{font-weight:700;font-size:15px;color:var(--uht-muted);letter-spacing:.02em}
