:root {
    color-scheme: light;
    --navy: #071a33;
    --navy-2: #0b2a4c;
    --ink: #10243e;
    --muted: #687b92;
    --line: #e1e8f0;
    --brand: #087f9c;
    --brand-dark: #06657e;
    --cyan: #19c5d8;
    --surface: #ffffff;
    --page: #f3f6fa;
    --shadow: 0 18px 50px rgba(13, 35, 62, .08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--page);
}
button, input { font: inherit; }
a { color: var(--brand-dark); }

/* Login */
.login-page { min-height: 100vh; background: #f5f7fb; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); }
.login-story {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    min-height: 100vh; padding: 42px clamp(34px, 6vw, 90px);
    color: #fff; background: radial-gradient(ellipse at 75% 52%, #123d68 0, transparent 42%), linear-gradient(145deg, #06152b, #0a2949 68%, #071a33);
}
.login-story::before, .login-story::after {
    content: ""; position: absolute; border: 1px solid rgba(79, 205, 229, .15);
    border-radius: 50%; pointer-events: none;
}
.login-story::before { width: 620px; height: 620px; right: -210px; top: 18%; }
.login-story::after { width: 440px; height: 440px; right: -120px; top: 27%; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; position: relative; z-index: 2; }
.brand-symbol {
    width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px;
    color: #fff; font-size: 23px; font-weight: 900;
    background: linear-gradient(145deg, #20c8dc, #08799e); box-shadow: 0 8px 24px rgba(17, 190, 218, .22);
}
.brand-name { font-size: 15px; font-weight: 900; letter-spacing: 1.7px; }
.brand-name span { display: block; margin-top: 3px; color: #84b8d0; font-size: 9px; letter-spacing: 2.8px; }
.story-copy { position: relative; z-index: 2; max-width: 570px; margin: auto 0; padding: 65px 0 20px; }
.eyebrow { margin: 0 0 15px; color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: 2.2px; }
.login-story .eyebrow { color: #55d3e2; }
.story-copy h1 { margin: 0; font-size: clamp(38px, 4.3vw, 61px); line-height: 1.08; letter-spacing: -2px; font-weight: 750; }
.story-description { max-width: 470px; margin: 24px 0; color: #b7c9dc; font-size: 16px; line-height: 1.8; }
.story-points { display: flex; flex-wrap: wrap; gap: 12px 22px; color: #d4e2ef; font-size: 12px; }
.story-points span { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #38d6c0; box-shadow: 0 0 12px #38d6c0; }
.login-visual { position: absolute; width: 390px; height: 390px; right: 2%; top: 25%; opacity: .75; }
.visual-orbit { position: absolute; border: 1px solid rgba(50, 206, 225, .35); border-radius: 50%; transform: rotate(-28deg); }
.orbit-one { inset: 20px -20px; }
.orbit-two { inset: 70px 30px; transform: rotate(48deg); }
.visual-core { position: absolute; inset: 105px; display: grid; place-items: center; border: 1px solid rgba(83, 224, 237, .5); border-radius: 50%; background: radial-gradient(circle, rgba(22, 172, 201, .24), rgba(9, 41, 72, .1) 68%); box-shadow: 0 0 70px rgba(16, 192, 222, .15); }
.visual-core span { font-size: 75px; font-weight: 900; color: rgba(109, 226, 239, .7); }
.node { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #59e0ed; box-shadow: 0 0 20px #59e0ed; }
.node-a { top: 48px; left: 100px; } .node-b { right: 22px; top: 180px; } .node-c { bottom: 36px; left: 160px; }
.visual-line { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, #39cfe0, transparent); transform-origin: left; }
.line-a { width: 130px; top: 58px; left: 105px; transform: rotate(35deg); }
.line-b { width: 145px; top: 185px; right: -5px; transform: rotate(145deg); }
.line-c { width: 125px; bottom: 45px; left: 165px; transform: rotate(-120deg); }
.story-footer { position: relative; z-index: 2; margin: 0; color: #7899b5; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; }
.story-footer span { padding: 0 8px; color: #3ed1df; }
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 55px clamp(28px, 5vw, 76px); background: #f7f9fc; }
.login-card { width: 100%; max-width: 420px; padding: 42px; background: #fff; border: 1px solid #e6ebf2; border-radius: 20px; box-shadow: var(--shadow); }
.mobile-brand { display: none; }
.login-card h2 { margin: 0; color: var(--navy); font-size: 29px; letter-spacing: -.9px; }
.login-intro { margin: 12px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.login-card label { display: block; margin: 19px 0 8px; color: #30445c; font-size: 12px; font-weight: 750; }
.login-card input {
    width: 100%; min-height: 49px; padding: 12px 14px; color: var(--ink);
    border: 1px solid #dce4ed; border-radius: 10px; background: #fbfcfe; outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.login-card input:focus { border-color: #0b9bb7; background: #fff; box-shadow: 0 0 0 4px rgba(11, 155, 183, .11); }
.login-card input::placeholder { color: #9aa8b8; }
.primary-button, .service-button {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 49px; padding: 0 17px; border: 0; border-radius: 10px;
    color: #fff; font-weight: 750; text-decoration: none; cursor: pointer;
    background: linear-gradient(100deg, #087d9b, #0b91a8);
    box-shadow: 0 8px 18px rgba(8, 125, 155, .16); transition: transform .18s, box-shadow .18s, filter .18s;
}
.primary-button { width: 100%; margin-top: 27px; }
.primary-button:hover, .service-button:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 12px 24px rgba(8, 125, 155, .23); }
.secure-note { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 26px; color: #8291a3; font-size: 11px; }
.secure-icon { color: #0b8aa4; font-size: 17px; }
.panel-footer { margin-top: 28px; color: #98a5b4; text-align: center; font-size: 10px; }
.alert { margin: 16px 0; padding: 12px 14px; border-radius: 9px; font-size: 13px; }
.alert.error { color: #a52828; background: #fff0f0; border: 1px solid #f5d0d0; }

/* Dashboard */
.portal-page { min-height: 100vh; background: #f4f7fb; }
.portal-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px max(5%, calc((100% - 1320px)/2)); background: #fff; border-bottom: 1px solid #e7edf4; }
.brand-lockup-dark { color: var(--navy); }
.brand-lockup-dark .brand-name span { color: #8095aa; }
.header-right, .user-identity { display: flex; align-items: center; gap: 13px; }
.user-identity { color: #3d5067; font-size: 13px; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #087c98; background: #e6f5f8; font-weight: 800; }
.role-tag { padding: 5px 9px; border-radius: 20px; color: #08677f; background: #e7f5f8; font-size: 10px; font-weight: 750; }
.logout-button { min-height: 37px; padding: 0 13px; border: 1px solid #dce5ed; border-radius: 9px; color: #53667c; background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.logout-button:hover { border-color: #9dcbd6; color: #08758e; background: #f5fbfc; }
.dashboard { max-width: 1320px; margin: 0 auto; padding: 54px 34px 30px; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.dashboard-heading .eyebrow { margin-bottom: 11px; }
.dashboard-heading h1 { margin: 0; color: var(--navy); font-size: clamp(30px, 3vw, 39px); letter-spacing: -1.3px; }
.dashboard-subtitle { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.access-indicator { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 9px 13px; border: 1px solid #dcebe9; border-radius: 30px; color: #55756f; background: #f7fcfa; font-size: 11px; font-weight: 650; white-space: nowrap; }
.access-indicator span { width: 7px; height: 7px; border-radius: 50%; background: #27b78a; box-shadow: 0 0 0 4px rgba(39,183,138,.1); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 22px; margin-top: 34px; }
.service-card {
    position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 23px;
    overflow: hidden; border: 1px solid #e2e9f1; border-radius: 17px; background: #fff;
    box-shadow: 0 8px 26px rgba(20, 43, 70, .035); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service-card:hover { transform: translateY(-4px); border-color: #c9e2e9; box-shadow: 0 17px 38px rgba(20, 43, 70, .085); }
.service-card-top { display: flex; justify-content: space-between; align-items: center; }
.service-kicker { color: #8191a3; font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.service-arrow { color: #91a5b7; font-size: 18px; }
.service-art { width: 86px; height: 86px; display: grid; place-items: center; margin: 17px 0 12px; border-radius: 18px; color: #087f9c; background: linear-gradient(145deg, #e9f8fa, #f2f7fc); }
.service-art svg { width: 53px; height: 53px; fill: none; stroke: #087f9c; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.service-art svg .chart-line { stroke: #19b8ca; stroke-width: 2.8; }
.service-art svg .chart-dot, .service-art svg .pulse-dot { fill: #19b8ca; stroke: none; }
.service-art-image { padding: 3px; background: #f1f7fb; }
.service-art-image img { width: 100%; height: 100%; object-fit: contain; }
.fallback-icon { font-size: 34px; font-weight: 850; }
.service-card h2 { margin: 4px 0 0; color: #122b48; font-size: 20px; line-height: 1.25; letter-spacing: -.35px; }
.service-description { min-height: 42px; margin: 9px 0 15px; color: #73849a; font-size: 12px; line-height: 1.65; }
.service-button { width: 100%; min-height: 43px; margin-top: auto; padding: 0 14px; font-size: 12px; }
.empty-state { grid-column: 1 / -1; padding: 28px; border: 1px dashed #cad6e2; border-radius: 14px; background: #fff; }
.empty-state h2 { margin-top: 0; }
.empty-state p { color: var(--muted); }
.dashboard-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 56px; padding-top: 18px; border-top: 1px solid #e3eaf1; color: #93a1b0; font-size: 9px; letter-spacing: 1px; }
.dashboard-footer span:last-child { letter-spacing: .2px; }

/* Existing administration pages */
.admin-nav { display: flex; flex-wrap: wrap; gap: 12px; max-width: 1270px; margin: 0 auto 12px; padding: 0 34px; }
.admin-nav a { display: inline-block; padding: 10px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand-dark); background: white; font-size: 12px; font-weight: 650; text-decoration: none; }
.admin-nav a:hover { background: #eaf7f9; }
.admin-form { max-width: 760px; padding: 28px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.admin-form select, .search-form input, .admin-form input:not([type="checkbox"]) { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; background: white; font: inherit; }
.admin-form select { margin-bottom: 4px; }
.admin-form label { display: block; margin-top: 16px; }
.admin-form input[type="checkbox"] { width: 18px; height: 18px; }
.permission-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 18px 0; }
.permission-item { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.permission-item small, .small-text { color: var(--muted); font-size: 12px; }
.form-page { max-width: 1000px; }
.search-form { display: flex; gap: 10px; margin: 24px 0; }
.search-button { width: auto; min-width: 110px; margin: 0; padding: 10px 16px; border: 0; border-radius: 9px; color: white; background: var(--brand); }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.admin-table th { background: #f8fafc; white-space: nowrap; }
.actions { min-width: 130px; }
.actions form { margin-top: 8px; }
.small-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.cancel-link { display: inline-block; margin-left: 14px; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-story { min-height: 330px; padding: 28px 30px; }
    .story-copy { margin: 35px 0 20px; padding: 0; }
    .story-copy h1 { font-size: 39px; }
    .story-description { max-width: 520px; margin: 15px 0; font-size: 14px; }
    .login-visual { width: 250px; height: 250px; top: 15%; right: -30px; opacity: .35; }
    .visual-core { inset: 70px; }
    .visual-core span { font-size: 48px; }
    .story-footer { display: none; }
    .login-panel { padding: 35px 22px; }
}
@media (max-width: 600px) {
    .login-story { min-height: 285px; padding: 22px; }
    .login-story > .brand-lockup { display: none; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
    .mobile-brand .brand-symbol { width: 36px; height: 36px; }
    .mobile-brand .brand-name { font-size: 12px; }
    .story-copy { margin: 0; }
    .story-copy h1 { font-size: 34px; }
    .story-points { gap: 9px 14px; font-size: 10px; }
    .login-visual { top: 7%; right: -100px; }
    .login-card { padding: 27px 23px; }
    .login-card h2 { font-size: 25px; }
    .portal-header { align-items: flex-start; flex-direction: column; padding: 15px 20px; }
    .header-right { width: 100%; justify-content: space-between; }
    .user-identity { gap: 8px; }
    .dashboard { padding: 35px 20px 24px; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .service-grid { grid-template-columns: 1fr; gap: 15px; margin-top: 25px; }
    .service-card { min-height: 270px; }
    .admin-nav { padding: 0 20px; }
    .dashboard-footer { flex-direction: column; margin-top: 35px; }
    .admin-form { padding: 18px; }
    .search-form { flex-direction: column; }
    .search-button { width: 100%; }
}

/* Global Technology brand mark */
.brand-symbol-image {
    overflow: hidden;
    padding: 5px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(11, 44, 73, .08);
}
.brand-symbol-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Brand wordmark: keep GLOBAL and TECHNOLOGY in one consistent style */
.brand-name {
    display: inline-block;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.7px;
    line-height: 1.2;
    white-space: nowrap;
}
.brand-name span { display: inline; margin: 0; color: inherit; font-size: inherit; letter-spacing: inherit; }
@media (max-width: 600px) {
    .mobile-brand .brand-name { font-size: 12px; }
}
