/* GridLogic IT — production overlay for FreeITSM
 * Surfaces: self-service sign-in, analyst sign-in, requester dashboard.
 * Hosted at https://gridlogicit.com/freeitsm-theme/
 * JS adds html.gl-ss-signin, html.gl-analyst-signin, html.gl-ss-dashboard, and html.gl-ready.
 * PHP sets data-gl-surface on login pages so first paint is already dark (no orb FOUC).
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('https://gridlogicit.com/fonts/inter-latin-wght.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('https://gridlogicit.com/fonts/jetbrains-mono-latin-wght.woff2') format('woff2');
}

html.gl-ss-signin,
html[data-gl-surface="signin"],
html[data-gl-surface="analyst-signin"],
html.gl-ss-dashboard {
    --gl-bg: #030510;
    --gl-text: #f8faff;
    --gl-muted: #9aabc2;
    --gl-secondary: #c5d0e4;
    --gl-accent: #7080e0;
    --gl-cyan: #22d3ee;
    --gl-gold: #c9a84c;
    --gl-purple: #8b5cf6;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html.gl-ss-signin,
html.gl-ss-signin body,
html[data-gl-surface="signin"],
html[data-gl-surface="signin"] body,
html[data-gl-surface="analyst-signin"],
html[data-gl-surface="analyst-signin"] body,
html.gl-ss-dashboard,
html.gl-ss-dashboard body {
    min-height: 100%;
    background: #030510 !important;
    color: var(--gl-text) !important;
    font-family: Inter, "Segoe UI", system-ui, sans-serif !important;
}

html.gl-ss-signin body,
html[data-gl-surface="signin"] body,
html[data-gl-surface="analyst-signin"] body {
    display: block !important;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.gl-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.gl-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(58px);
    opacity: 0.9;
}

.gl-blob-a {
    width: 560px; height: 560px; left: -8%; top: -12%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.85), transparent 68%);
}

.gl-blob-b {
    width: 680px; height: 680px; right: -12%; top: 8%;
    background: radial-gradient(circle, rgba(146, 157, 248, 0.8), transparent 70%);
}

.gl-blob-c {
    width: 520px; height: 520px; left: 28%; bottom: -18%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.7), transparent 68%);
}

.gl-blob-d {
    width: 400px; height: 400px; right: 18%; bottom: 6%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.45), transparent 70%);
}

.gl-gradient {
    background: linear-gradient(180deg, #7ef0ff 0%, #22d3ee 42%, #7080e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Sign-in (self-service login.php only) ── */
html.gl-ss-signin #gridlogic-signin-bg,
html.gl-ss-signin #gl-signin-canvas,
html.gl-ss-signin #gl-signin-stars,
html.gl-ss-signin .gl-signin-well,
html[data-gl-surface="signin"] #gridlogic-signin-bg,
html[data-gl-surface="signin"] #gl-signin-canvas,
html[data-gl-surface="signin"] #gl-signin-stars,
html[data-gl-surface="signin"] .gl-signin-well,
html[data-gl-surface="analyst-signin"] #gridlogic-signin-bg,
html[data-gl-surface="analyst-signin"] #gl-signin-canvas,
html[data-gl-surface="analyst-signin"] #gl-signin-stars,
html[data-gl-surface="analyst-signin"] .gl-signin-well {
    display: none !important;
}

/* Hide the unwrapped FreeITSM card until JS builds .gl-login-frame.
   Fallback unhides it if overlay JS never runs. */
@keyframes gl-show-login {
    to { visibility: visible; }
}
html[data-gl-surface="signin"]:not(.gl-ready) .login-container,
html[data-gl-surface="analyst-signin"]:not(.gl-ready) .login-container {
    visibility: hidden;
    animation: gl-show-login 0s linear 4s forwards;
}
html.gl-ready .login-container {
    visibility: visible;
    animation: none;
}

html.gl-ss-signin .gl-login-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px 88px;
    box-sizing: border-box;
}

html.gl-ss-signin .gl-login-frame {
    width: min(1080px, 100%);
    padding: 28px 32px 36px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(28px) saturate(1.45);
    -webkit-backdrop-filter: blur(28px) saturate(1.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

html.gl-ss-signin .gl-login-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

html.gl-ss-signin .gl-login-top img {
    height: 36px;
    width: auto;
    max-width: 220px;
    filter: none !important;
}

html.gl-ss-signin .gl-login-kicker {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gl-secondary);
    font-weight: 600;
}

html.gl-ss-signin .gl-login-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    padding: 28px 8px 8px;
}

html.gl-ss-signin .gl-login-copy h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #f8faff !important;
    margin: 10px 0 12px !important;
}

html.gl-ss-signin .gl-login-copy p {
    color: var(--gl-secondary) !important;
    max-width: 38ch;
    font-size: 15px;
}

html.gl-ss-signin .login-container {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 28px 26px 22px !important;
    border-radius: 28px !important;
    background: rgba(12, 18, 40, 0.42) !important;
    backdrop-filter: blur(28px) saturate(1.45) !important;
    -webkit-backdrop-filter: blur(28px) saturate(1.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

html.gl-ss-signin .login-header { margin-bottom: 18px !important; text-align: left !important; }
html.gl-ss-signin .login-header img { display: none !important; }
html.gl-ss-signin .login-header h1 {
    color: #f8faff !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}
html.gl-ss-signin .login-header p,
html.gl-ss-signin .mfa-desc { color: var(--gl-secondary) !important; }

html.gl-ss-signin .form-group label { color: var(--gl-secondary) !important; font-size: 13px !important; font-weight: 600; }
html.gl-ss-signin .form-group input,
html.gl-ss-signin .otp-input {
    background: rgba(4, 8, 20, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 14px !important;
    color: #f8faff !important;
    padding: 12px 14px !important;
}

html.gl-ss-signin .login-button,
html.gl-ss-signin .login-btn {
    width: 100%;
    border: 0 !important;
    border-radius: 999px !important;
    min-height: 48px;
    font-weight: 650 !important;
    margin-top: 8px;
    transform: none !important;
}

html.gl-ss-signin #continueBtn {
    background: linear-gradient(135deg, #e8ecff, #fff 40%, #c9f7ff) !important;
    color: #071018 !important;
}

html.gl-ss-signin #loginBtn,
html.gl-ss-signin #mfaBtn {
    background: linear-gradient(135deg, #5b52f0, #7080e0 45%, #22d3ee) !important;
    color: #fff !important;
}

html.gl-ss-signin .sso-provider-btn {
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f8faff !important;
}

html.gl-ss-signin .login-container a[href*="oidc_login"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 4px !important;
    padding: 12px 16px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f8faff !important;
    font-weight: 650 !important;
    text-decoration: none !important;
}

html.gl-ss-signin .forgot-link,
html.gl-ss-signin #showLocalLink {
    color: #929df8 !important;
}

html.gl-ss-signin .modal-overlay {
    background: rgba(3, 5, 16, 0.72) !important;
    z-index: 50;
}

html.gl-ss-signin .modal-box {
    background: rgba(12, 18, 40, 0.94) !important;
    backdrop-filter: blur(28px) saturate(1.45) !important;
    -webkit-backdrop-filter: blur(28px) saturate(1.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    color: #f8faff !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

html.gl-ss-signin .modal-box h2 {
    color: #f8faff !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

html.gl-ss-signin .modal-close {
    color: #c5d0e4 !important;
}

html.gl-ss-signin .login-links a,
html.gl-ss-signin .ss-text-link,
html.gl-ss-signin .mfa-back a { color: #929df8 !important; }

html.gl-ss-signin .error-message {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fecaca !important;
    border-left-color: #ef4444 !important;
}

html.gl-ss-signin #gridlogic-signin-legal { z-index: 10; }

@media (prefers-reduced-motion: reduce) {
    .gl-blob { filter: blur(50px); }
}

/* ── Dashboard (self-service index.php only) ── */
html.gl-ss-dashboard body {
    overflow: auto !important;
    height: auto !important;
}

html.gl-ss-dashboard .portal-header {
    position: relative;
    z-index: 20;
    height: auto !important;
    min-height: 64px;
    margin: 12px 14px 0;
    padding: 10px 18px !important;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    color: #f8faff !important;
}

html.gl-ss-dashboard .portal-brand,
html.gl-ss-dashboard .portal-brand span { color: #f8faff !important; }
html.gl-ss-dashboard .portal-brand img { filter: none !important; height: 32px !important; }

html.gl-ss-dashboard .portal-nav .nav-btn {
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--gl-muted) !important;
    border: 1px solid transparent !important;
}

html.gl-ss-dashboard .portal-nav .nav-btn.active,
html.gl-ss-dashboard .portal-nav .nav-btn:hover {
    background: rgba(112, 128, 224, 0.22) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

html.gl-ss-dashboard .portal-layout {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 22px auto 48px !important;
    padding: 0 16px 32px !important;
    --accent: #7080e0;
    --ss-accent: #7080e0;
    --ss-accent-hover: #929df8;
    --on-accent: #fff;
}

html.gl-ss-dashboard .welcome-section h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    color: #f8faff !important;
}

html.gl-ss-dashboard .welcome-section p { color: var(--gl-secondary) !important; }

html.gl-ss-dashboard .portal-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
}

html.gl-ss-dashboard .portal-action {
    border-radius: 20px !important;
    padding: 16px 18px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #f8faff !important;
}

html.gl-ss-dashboard .portal-action-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f8faff !important;
}

html.gl-ss-dashboard .portal-action-title { color: #f8faff !important; }

html.gl-ss-dashboard .summary-cards { gap: 12px !important; }
html.gl-ss-dashboard .summary-card {
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 18px !important;
    padding: 16px 18px !important;
}
html.gl-ss-dashboard .summary-card .card-label {
    color: var(--gl-muted) !important;
    font-size: 11px !important;
    letter-spacing: 0.08em;
}
html.gl-ss-dashboard .summary-card .card-value {
    color: #f8faff !important;
    font-size: 28px !important;
    font-weight: 800 !important;
}

html.gl-ss-dashboard .portal-section,
html.gl-ss-dashboard .article-card {
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 18px !important;
    color: #f8faff;
}

html.gl-ss-dashboard .section-header h2,
html.gl-ss-dashboard .article-card-title,
html.gl-ss-dashboard .ticket-table td,
html.gl-ss-dashboard .svc-name { color: #f8faff !important; }

html.gl-ss-dashboard .section-header a,
html.gl-ss-dashboard .ticket-link { color: #22d3ee !important; }

html.gl-ss-dashboard .ticket-table th {
    background: transparent !important;
    color: var(--gl-muted) !important;
}

html.gl-ss-dashboard .ticket-table tr:hover { background: rgba(112, 128, 224, 0.12) !important; }

html.gl-ss-dashboard .btn-primary {
    background: linear-gradient(135deg, #e8ecff, #fff) !important;
    color: #071018 !important;
    border-radius: 999px !important;
    border: 0 !important;
}

html.gl-ss-dashboard .status-open { background: rgba(34, 211, 238, 0.16) !important; color: #7ef0ff !important; }
html.gl-ss-dashboard .status-in-progress { background: rgba(245, 158, 11, 0.16) !important; color: #fbbf24 !important; }
html.gl-ss-dashboard .status-on-hold { background: rgba(139, 92, 246, 0.18) !important; color: #c4b5fd !important; }
html.gl-ss-dashboard .status-closed { background: rgba(34, 211, 160, 0.16) !important; color: #6ee7b7 !important; }
html.gl-ss-dashboard .impact-operational { background: rgba(34, 211, 160, 0.16) !important; color: #6ee7b7 !important; }
html.gl-ss-dashboard .impact-degraded { background: rgba(245, 158, 11, 0.16) !important; color: #fbbf24 !important; }
html.gl-ss-dashboard .impact-partial-outage,
html.gl-ss-dashboard .impact-major-outage { background: rgba(239, 68, 68, 0.16) !important; color: #fecaca !important; }
html.gl-ss-dashboard .impact-maintenance { background: rgba(59, 130, 246, 0.18) !important; color: #93c5fd !important; }

html.gl-ss-signin body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}

html.gl-ss-signin .mfa-section.active { display: block !important; }
html.gl-ss-signin .sso-divider { color: var(--gl-muted) !important; }
html.gl-ss-signin .sso-divider span { background: rgba(146, 157, 248, 0.22) !important; }
html.gl-ss-signin .login-links { text-align: left; margin-top: 16px; }
html.gl-ss-signin .mfa-icon svg { color: #929df8 !important; }

html.gl-ss-signin #gridlogic-signin-legal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 22px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

html.gl-ss-signin #gridlogic-signin-legal .gl-legal-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(28px) saturate(1.45);
    -webkit-backdrop-filter: blur(28px) saturate(1.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #b0bfd4;
    font-size: 12.5px;
    text-decoration: none;
}

html.gl-ss-signin #gridlogic-signin-legal a.gl-legal-pill:hover {
    color: #f8faff;
    border-color: rgba(255, 255, 255, 0.42);
}

html.gl-ss-dashboard .portal-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 8px;
}

html.gl-ss-dashboard .portal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

html.gl-ss-dashboard .portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 350px);
    gap: 18px;
    align-items: start;
}

html.gl-ss-dashboard .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html.gl-ss-dashboard .section-header a,
html.gl-ss-dashboard .section-link { color: #22d3ee !important; }

html.gl-ss-dashboard .ticket-date,
html.gl-ss-dashboard .empty-state,
html.gl-ss-dashboard .loading-state,
html.gl-ss-dashboard .article-card-preview {
    color: var(--gl-muted) !important;
}

html.gl-ss-dashboard .ticket-number { color: #929df8 !important; }

html.gl-ss-dashboard .priority-high { background: rgba(239, 68, 68, 0.16) !important; color: #fecaca !important; }
html.gl-ss-dashboard .priority-normal { background: rgba(255, 255, 255, 0.08) !important; color: var(--gl-secondary) !important; }
html.gl-ss-dashboard .priority-low { background: rgba(99, 102, 241, 0.18) !important; color: #c7d2fe !important; }

html.gl-ss-dashboard .req-pill.pending { background: rgba(245, 158, 11, 0.16) !important; color: #fbbf24 !important; }
html.gl-ss-dashboard .req-pill.approved { background: rgba(34, 211, 160, 0.16) !important; color: #6ee7b7 !important; }
html.gl-ss-dashboard .req-pill.rejected { background: rgba(239, 68, 68, 0.16) !important; color: #fecaca !important; }

html.gl-ss-dashboard .all-operational { color: #6ee7b7 !important; }
html.gl-ss-dashboard .service-item { border-bottom-color: rgba(255, 255, 255, 0.08) !important; }

html.gl-ss-dashboard .ss-user-avatar {
    background: linear-gradient(135deg, #5b52f0, #22d3ee) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    color: #fff !important;
    flex-shrink: 0;
}

html.gl-ss-dashboard .ss-user-menu {
    background: rgba(12, 18, 40, 0.94) !important;
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

html.gl-ss-dashboard .ss-menu-header { border-bottom-color: rgba(255, 255, 255, 0.12) !important; }
html.gl-ss-dashboard .ss-menu-name { color: #f8faff !important; }
html.gl-ss-dashboard .ss-menu-email { color: var(--gl-muted) !important; }
html.gl-ss-dashboard .ss-menu-item { color: #f8faff !important; }
html.gl-ss-dashboard .ss-menu-item:hover { background: rgba(112, 128, 224, 0.22) !important; }
html.gl-ss-dashboard .ss-menu-item svg { color: #929df8 !important; }
html.gl-ss-dashboard .ss-menu-divider { background: rgba(255, 255, 255, 0.12) !important; }
html.gl-ss-dashboard .ss-menu-item.logout-item { color: #fecaca !important; }

html.gl-ss-dashboard .ss-modal-box {
    background: rgba(12, 18, 40, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8faff;
}
html.gl-ss-dashboard .ss-modal-header,
html.gl-ss-dashboard .ss-form-label,
html.gl-ss-dashboard .ss-modal-header { color: #f8faff !important; border-color: rgba(255, 255, 255, 0.12) !important; }
html.gl-ss-dashboard .ss-form-input {
    background: rgba(4, 8, 20, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #f8faff !important;
}
html.gl-ss-dashboard .ss-btn-primary {
    background: linear-gradient(135deg, #5b52f0, #22d3ee) !important;
    color: #fff !important;
    border-radius: 999px !important;
}

html.gl-ss-signin,
html.gl-ss-signin body {
    overflow-x: hidden;
}

html.gl-ss-dashboard .gl-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

html.gl-ss-dashboard .gl-nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

html.gl-ss-dashboard .gl-nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
html.gl-ss-dashboard .gl-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
html.gl-ss-dashboard .gl-nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

html.gl-ss-signin .login-button,
html.gl-ss-signin .login-btn,
html.gl-ss-signin .sso-provider-btn,
html.gl-ss-signin .login-container a[href*="oidc_login"],
html.gl-ss-dashboard .portal-action,
html.gl-ss-dashboard .nav-btn,
html.gl-ss-dashboard .gl-nav-toggle {
    touch-action: manipulation;
}

@media (max-width: 980px) {
    html.gl-ss-signin .gl-login-hero { grid-template-columns: 1fr; }
    html.gl-ss-signin .gl-login-shell {
        align-items: flex-start;
        min-height: auto;
        padding: max(16px, env(safe-area-inset-top, 0px)) 14px calc(120px + env(safe-area-inset-bottom, 0px));
    }
    html.gl-ss-signin .gl-login-frame {
        padding: 18px 16px 22px;
        border-radius: 24px;
    }
    html.gl-ss-signin .gl-login-hero { gap: 18px; padding: 16px 0 0; }
    html.gl-ss-signin .gl-login-copy p { max-width: none; }
    html.gl-ss-signin .gl-login-top .gl-login-kicker { display: none; }
    html.gl-ss-signin .login-container { padding: 22px 18px 18px !important; border-radius: 22px !important; }
    html.gl-ss-signin .sso-provider-btn,
    html.gl-ss-signin .login-container a[href*="oidc_login"] { min-height: 44px; }
    html.gl-ss-signin .login-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        justify-content: center;
    }
    html.gl-ss-dashboard .portal-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .gl-blob-c,
    .gl-blob-d { display: none; }
    .gl-blob-a { width: 280px; height: 280px; }
    .gl-blob-b { width: 320px; height: 320px; }

    html.gl-ss-signin .gl-login-top img { height: 28px; max-width: 160px; }
    html.gl-ss-signin .form-group input,
    html.gl-ss-signin .otp-input {
        font-size: 16px !important;
        min-height: 44px;
        padding: 12px 14px !important;
        max-width: 100%;
        box-sizing: border-box;
    }
    html.gl-ss-signin .otp-input {
        letter-spacing: 0.35em !important;
        font-size: 18px !important;
    }
    html.gl-ss-signin .login-button,
    html.gl-ss-signin .login-btn { min-height: 48px; font-size: 16px !important; }

    html.gl-ss-signin #gridlogic-signin-legal {
        left: max(10px, env(safe-area-inset-left, 0px));
        right: max(10px, env(safe-area-inset-right, 0px));
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
        gap: 8px;
        padding: 0;
    }
    html.gl-ss-signin #gridlogic-signin-legal .gl-legal-pill {
        padding: 8px 12px;
        font-size: 11px;
        min-height: 36px;
    }
    html.gl-ss-signin #gridlogic-signin-legal .gl-legal-pill:first-child {
        flex: 1 0 100%;
        justify-content: center;
    }

    html.gl-ss-dashboard .portal-header {
        margin: 8px max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px));
        padding: 8px 10px !important;
        gap: 10px;
        min-height: 56px;
        top: max(6px, env(safe-area-inset-top, 0px));
        flex-wrap: nowrap;
        overflow: visible;
    }
    html.gl-ss-dashboard .portal-brand { min-width: 0; }
    html.gl-ss-dashboard .portal-brand span { display: none; }
    html.gl-ss-dashboard .portal-brand img {
        height: 28px !important;
        max-width: 112px;
    }
    html.gl-ss-dashboard .portal-nav { margin-left: 0; }
    html.gl-ss-dashboard .ss-user-avatar {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    html.gl-ss-dashboard .gl-nav-toggle { display: inline-flex; }
    html.gl-ss-dashboard .portal-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
        border-radius: 16px;
        background: #0a1020;
        border: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
        z-index: 40;
    }
    html.gl-ss-dashboard .portal-nav.gl-nav-open { display: flex !important; }
    html.gl-ss-dashboard .portal-nav .nav-btn {
        min-height: 44px;
        min-width: 0 !important;
        justify-content: flex-start !important;
        padding: 10px 14px !important;
    }

    html.gl-ss-dashboard .portal-layout {
        padding: 16px max(12px, env(safe-area-inset-right, 0px)) 40px max(12px, env(safe-area-inset-left, 0px)) !important;
        margin-top: 16px !important;
        min-width: 0;
    }
    html.gl-ss-dashboard .welcome-section h1 { font-size: clamp(1.45rem, 7vw, 2rem) !important; }
    html.gl-ss-dashboard .portal-actions { gap: 10px; }
    html.gl-ss-dashboard .portal-action { min-height: 48px; }
    html.gl-ss-dashboard .summary-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
    html.gl-ss-dashboard .summary-card .card-value { font-size: 22px !important; }
    html.gl-ss-dashboard .article-grid { grid-template-columns: 1fr !important; }

    html.gl-ss-dashboard .portal-section,
    html.gl-ss-dashboard .portal-grid > * { min-width: 0; }
    html.gl-ss-dashboard .portal-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    html.gl-ss-dashboard .ticket-table { min-width: 0; }
    html.gl-ss-dashboard .ticket-table th,
    html.gl-ss-dashboard .ticket-table td { padding: 10px 12px; }
    html.gl-ss-dashboard .ticket-link { overflow-wrap: anywhere; }
    html.gl-ss-dashboard .ticket-table th:nth-child(n+4),
    html.gl-ss-dashboard .ticket-table td:nth-child(n+4) { display: none; }

    html.gl-ss-dashboard .ss-user-menu {
        right: 0;
        min-width: min(240px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }
    html.gl-ss-dashboard .ss-modal-box { width: calc(100% - 24px); }
    html.gl-ss-dashboard .ss-menu-item { min-height: 44px; }
}

@media (max-width: 480px) {
    html.gl-ss-signin .gl-login-copy h2 { font-size: 1.55rem; }
}
