:root {
    --bg: #f3f5f8;
    --card: #ffffff;
    --text: #202124;
    --heading: #111827;
    --muted: #6b7280;
    --border: #e2e5e9;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --purple: #7c3aed;
    --header: rgba(255,255,255,.94);
    --input: #f8fafc;
    --shadow: 0 10px 35px rgba(15,23,42,.08);
    --shadow-hover: 0 18px 42px rgba(15,23,42,.14);
}
body.dark {
    --bg: #0b1220;
    --card: #151f32;
    --text: #e5e7eb;
    --heading: #fff;
    --muted: #9ca3af;
    --border: #263247;
    --header: rgba(11,18,32,.94);
    --input: #0e1728;
    --shadow: 0 12px 40px rgba(0,0,0,.28);
    --shadow-hover: 0 18px 50px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}
.header-inner {
    max-width: 1440px; min-height: 70px; margin: auto; padding: 10px 24px;
    display: flex; align-items: center; gap: 24px;
}
.logo { font-size: 25px; font-weight: 800; letter-spacing: -1.2px; white-space: nowrap; }
.logo span { color: var(--blue); }
.search { position: relative; flex: 1; max-width: 720px; margin: 0 auto; }
.search input {
    width: 100%; height: 46px; padding: 0 55px 0 18px;
    border: 1px solid var(--border); border-radius: 24px;
    background: var(--input); color: var(--text); outline: none;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.search button {
    position: absolute; right: 5px; top: 5px; width: 36px; height: 36px;
    border: 0; border-radius: 50%; background: var(--blue); color: white; cursor: pointer; font-size: 21px;
}
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button, .header-button {
    border: 0; border-radius: 10px; padding: 10px 13px; cursor: pointer;
    background: transparent; color: var(--text); text-decoration: none;
}
.icon-button:hover, .header-button:hover { background: var(--bg); }
.mail-button { background: var(--blue); color: white; font-weight: 700; }
.mail-button:hover { background: var(--blue-dark); }
.main-nav { background: var(--header); border-bottom: 1px solid var(--border); }
.nav-inner {
    max-width: 1440px; margin: auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto;
}
.nav-inner a { padding: 13px 15px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.nav-inner a:hover { color: var(--blue); background: var(--bg); }
.container { max-width: 1440px; margin: 0 auto; padding: 28px 24px 50px; }
.welcome { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:22px; }
.welcome h1 { margin: 2px 0 5px; font-size: 30px; letter-spacing:-.8px; color:var(--heading); }
.welcome p { margin:0; color:var(--muted); }
.eyebrow { margin:0 0 5px !important; font-size:11px !important; font-weight:800; letter-spacing:1.2px; color:var(--blue) !important; }
.eyebrow.light { color:rgba(255,255,255,.75) !important; }
.status-pill { padding:7px 11px; border:1px solid var(--border); border-radius:20px; font-size:12px; color:var(--muted); white-space:nowrap; }
.status-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:#22c55e; margin-right:6px; }
.top-grid { display:grid; grid-template-columns:2fr 1fr; gap:20px; }
.hero {
    min-height:360px; border-radius:20px; overflow:hidden; color:white; display:flex; align-items:flex-end;
    padding:34px; box-shadow:var(--shadow);
    background:
      linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.78)),
      radial-gradient(circle at 80% 20%, #8b5cf6, transparent 34%),
      linear-gradient(135deg, #2563eb, #4f46e5);
    transition:transform .2s, box-shadow .2s;
}
.hero:hover { transform:translateY(-2px); box-shadow:var(--shadow-hover); }
.hero-content { max-width:760px; }
.tag { display:inline-block; padding:6px 11px; border-radius:20px; background:rgba(255,255,255,.16); font-size:11px; font-weight:800; letter-spacing:.7px; }
.hero h2 { font-size:36px; line-height:1.08; margin:14px 0 12px; letter-spacing:-1.2px; }
.hero p { max-width:650px; margin:0 0 20px; line-height:1.6; color:rgba(255,255,255,.88); }
.hero-link { font-weight:700; font-size:14px; }
.weather-card, .card, .service {
    background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow);
}
.weather-card { border-radius:20px; padding:24px; }
.card-heading { display:flex; justify-content:space-between; gap:15px; align-items:flex-start; }
.card-heading h2 { margin:0; font-size:20px; color:var(--heading); }
.weather-refresh { font-size:25px; color:var(--muted); cursor:pointer; line-height:1; }
.weather-main { display:flex; align-items:center; gap:18px; margin:30px 0 25px; }
.weather-icon { font-size:60px; line-height:1; }
.temperature { font-size:46px; font-weight:800; line-height:1; color:var(--heading); }
.weather-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px; font-size:12px; color:var(--muted); }
.weather-meta span:last-child { grid-column:1/-1; }
.weather-location-button {
    margin-top:18px; width:100%; padding:10px; border:1px solid var(--border); border-radius:10px;
    background:var(--input); color:var(--text); cursor:pointer;
}
.weather-location-button:disabled { opacity:.6; cursor:wait; }
.weather-source { font-size:10px !important; color:var(--muted); margin:12px 0 0 !important; }
section { scroll-margin-top:100px; }
.section-title { display:flex; justify-content:space-between; align-items:center; margin:34px 0 13px; }
.section-title h2 { margin:0; color:var(--heading); font-size:21px; }
.section-title a { color:var(--blue); font-size:13px; }
.cards { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; }
.card { border-radius:15px; padding:20px; min-height:185px; transition:transform .18s, box-shadow .18s; }
.card:hover { transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.card-icon { font-size:28px; margin-bottom:12px; }
.source { color:var(--blue); font-size:11px; font-weight:800; text-transform:uppercase; margin-bottom:8px; letter-spacing:.4px; }
.card h3 { color:var(--heading); font-size:16px; line-height:1.35; margin:0 0 9px; }
.card p { color:var(--muted); font-size:13px; line-height:1.5; margin:0; }
.services { display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.service { border-radius:15px; padding:19px 12px; text-align:center; transition:transform .18s, box-shadow .18s; }
.service:hover { transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.service div { font-size:31px; margin-bottom:10px; }
.service strong { display:block; color:var(--heading); margin-bottom:4px; }
.service span { color:var(--muted); font-size:12px; }
.webmail {
    margin-top:36px; border-radius:20px; padding:30px; display:flex; align-items:center; justify-content:space-between; gap:25px;
    color:white; background:linear-gradient(135deg,#1d4ed8,#4f46e5); box-shadow:var(--shadow);
}
.webmail h2 { margin:0 0 7px; font-size:25px; }
.webmail p:not(.eyebrow) { margin:0; color:rgba(255,255,255,.8); }
.mail-link { background:white; color:#1d4ed8; padding:12px 18px; border-radius:10px; font-weight:800; white-space:nowrap; }
.mail-link:hover { background:#eef2ff; }
footer { border-top:1px solid var(--border); background:var(--card); color:var(--muted); padding:28px 24px; font-size:12px; }
.footer-inner { max-width:1440px; margin:auto; display:flex; justify-content:space-between; gap:20px; }
.footer-links { display:flex; gap:18px; flex-wrap:wrap; }
.footer-links a:hover { color:var(--blue); }

/* Webmail */
.mail-page { background:
    radial-gradient(circle at 15% 10%, rgba(79,140,255,.13), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(139,92,246,.11), transparent 30%), var(--bg);
}
.mail-main { min-height:calc(100vh - 125px); display:flex; justify-content:center; align-items:center; padding:60px 20px; }
.login-wrapper { width:100%; max-width:430px; }
.mail-intro { text-align:center; margin-bottom:24px; }
.mail-icon { width:64px; height:64px; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; border-radius:18px; font-size:29px; background:linear-gradient(135deg,rgba(79,140,255,.18),rgba(139,92,246,.18)); border:1px solid var(--border); }
.mail-intro h1 { margin:0 0 8px; font-size:30px; color:var(--heading); }
.mail-intro p:last-child { margin:0; color:var(--muted); }
.login-card { background:var(--card); border:1px solid var(--border); border-radius:20px; padding:30px; box-shadow:0 25px 70px rgba(0,0,0,.18); }
.field { margin-bottom:19px; }
.field label { display:block; margin-bottom:8px; color:var(--text); font-size:13px; font-weight:700; }
.field input[type=email], .field input[type=password], .field input[type=text] {
    width:100%; height:50px; padding:0 15px; border-radius:11px; border:1px solid var(--border); outline:none; background:var(--input); color:var(--text);
}
.field input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(79,140,255,.12); }
.password-container { position:relative; }
.password-container input { padding-right:52px !important; }
.show-password { position:absolute; right:10px; top:50%; transform:translateY(-50%); border:0; background:transparent; color:var(--muted); cursor:pointer; padding:6px; }
.options { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:5px 0 23px; font-size:13px; }
.remember { display:flex; align-items:center; gap:8px; color:var(--muted); }
.remember input { accent-color:var(--blue); }
.forgot { color:var(--blue); }
.login-button { width:100%; height:50px; border:0; border-radius:11px; color:white; font-weight:700; cursor:pointer; background:linear-gradient(135deg,var(--blue),var(--purple)); box-shadow:0 10px 25px rgba(79,140,255,.2); }
.login-button:hover { transform:translateY(-1px); }
.login-help { color:var(--muted); font-size:11px; line-height:1.5; text-align:center; margin:14px 0 0; }
.back { display:block; text-align:center; color:var(--muted); font-size:13px; margin-top:20px; }
.back:hover { color:var(--blue); }

@media (max-width:1100px) {
    .cards { grid-template-columns:repeat(2,1fr); }
    .services { grid-template-columns:repeat(3,1fr); }
    .top-grid { grid-template-columns:1fr; }
}
@media (max-width:700px) {
    .header-inner { flex-wrap:wrap; padding:12px 14px; }
    .logo { font-size:21px; }
    .search { order:3; max-width:none; flex-basis:100%; }
    .header-actions { margin-left:auto; }
    .container { padding:20px 14px 35px; }
    .welcome { align-items:flex-start; }
    .status-pill { display:none; }
    .hero { min-height:310px; padding:25px; }
    .hero h2 { font-size:29px; }
    .cards { grid-template-columns:1fr; }
    .services { grid-template-columns:repeat(2,1fr); }
    .webmail { flex-direction:column; align-items:flex-start; }
    .footer-inner { flex-direction:column; }
}
@media (max-width:500px) {
    .main-nav .nav-inner { padding:0 10px; }
    .mail-main { padding:40px 15px; align-items:flex-start; }
    .login-card { padding:24px 20px; }
}
