:root {
    --bg: #07101d;
    --bg-soft: #0b1726;
    --surface: #0f1d2d;
    --surface-2: #122439;
    --text: #f5f8fb;
    --muted: #9cacbd;
    --green: #55e12c;
    --green-2: #2bc52d;
    --green-soft: rgba(85, 225, 44, .13);
    --line: rgba(255,255,255,.08);
    --shadow: 0 30px 70px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(7,16,29,.78);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
    transition: .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-wrap { height: 78px; display:flex; align-items:center; justify-content:space-between; gap:28px; }
.brand { display:flex; align-items:center; gap:12px; font-weight:800; letter-spacing:-.03em; font-size:1.18rem; }
.brand img { width:44px; height:44px; object-fit:contain; border-radius:10px; }
.main-nav { display:flex; align-items:center; gap:28px; color:#c9d3dc; font-size:.93rem; font-weight:600; }
.main-nav a { transition:.2s ease; }
.main-nav a:hover { color: var(--green); }
.nav-cta { padding:10px 16px; border:1px solid rgba(85,225,44,.36); border-radius:999px; background:var(--green-soft); color:#dfffd4 !important; }
.menu-toggle { display:none; border:0; background:none; padding:8px; }
.menu-toggle span:not(.sr-only) { display:block; width:24px; height:2px; background:#fff; margin:5px 0; }

.hero {
    min-height: 820px;
    padding: 150px 0 90px;
    position: relative;
    overflow:hidden;
    background:
        radial-gradient(circle at 75% 45%, rgba(69,218,50,.09), transparent 28%),
        linear-gradient(180deg, #081322 0%, #07101d 100%);
}
.hero::before {
    content:"";
    position:absolute; inset:0;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size:52px 52px;
    mask-image:linear-gradient(to bottom, rgba(0,0,0,.8), transparent 85%);
}
.hero-grid { position:relative; z-index:2; display:grid; grid-template-columns:1.05fr .95fr; gap:70px; align-items:center; }
.eyebrow, .section-tag {
    display:inline-flex; align-items:center; gap:9px;
    color:#bdf8ac; text-transform:uppercase; letter-spacing:.16em; font-size:.75rem; font-weight:800;
}
.eyebrow::before, .section-tag::before { content:""; width:28px; height:2px; background:var(--green); box-shadow:0 0 18px var(--green); }
.hero h1 { margin:18px 0 24px; font-size:clamp(3.3rem, 7vw, 6.9rem); line-height:.92; letter-spacing:-.07em; max-width:760px; }
.hero h1 span { color:var(--green); }
.hero-lead { color:#afbdc9; font-size:1.12rem; max-width:650px; margin:0 0 34px; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; }
.btn { display:inline-flex; align-items:center; justify-content:center; min-height:50px; padding:0 22px; border-radius:12px; font-weight:800; transition:.22s ease; border:1px solid transparent; }
.btn-primary { background:linear-gradient(135deg, var(--green), var(--green-2)); color:#06110a; box-shadow:0 12px 35px rgba(64,220,45,.22); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 16px 38px rgba(64,220,45,.3); }
.btn-secondary { border-color:var(--line); background:rgba(255,255,255,.035); color:#e8eff4; }
.btn-secondary:hover { border-color:rgba(85,225,44,.35); }
.hero-meta { margin-top:52px; display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; max-width:670px; }
.hero-meta div { border-top:1px solid var(--line); padding-top:15px; }
.hero-meta strong { display:block; color:#fff; font-size:.92rem; }
.hero-meta span { display:block; color:#718397; font-size:.78rem; margin-top:2px; }
.hero-visual { min-height:560px; display:grid; place-items:center; }
.logo-stage { width:min(100%, 530px); aspect-ratio:1; position:relative; border:1px solid rgba(85,225,44,.13); border-radius:32px; background:linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); box-shadow:var(--shadow); overflow:hidden; }
.grid-lines { position:absolute; inset:0; background-image:linear-gradient(rgba(85,225,44,.07) 1px, transparent 1px),linear-gradient(90deg,rgba(85,225,44,.07) 1px, transparent 1px); background-size:36px 36px; mask-image:radial-gradient(circle at center, #000, transparent 72%); }
.logo-stage img { position:absolute; width:83%; left:8.5%; top:9%; z-index:2; filter:drop-shadow(0 25px 35px rgba(0,0,0,.35));  }
.logo-glow { position:absolute; width:260px; height:260px; border-radius:50%; background:rgba(70,240,45,.16); filter:blur(45px); right:22px; top:92px; }
.tech-node { position:absolute; width:12px; height:12px; background:var(--green); border-radius:50%; box-shadow:0 0 0 7px rgba(85,225,44,.08),0 0 22px var(--green); }
.node-a { right:25px; top:105px; }.node-b { left:65px; bottom:85px; }.node-c { right:115px; bottom:36px; }
.hero-orb { position:absolute; border-radius:50%; filter:blur(2px); opacity:.45; }
.hero-orb-one { width:260px; height:260px; border:1px solid rgba(85,225,44,.12); right:-120px; top:130px; }
.hero-orb-two { width:460px; height:460px; border:1px solid rgba(255,255,255,.04); left:-270px; bottom:-100px; }

.intro { padding:110px 0; border-top:1px solid var(--line); }
.split-grid { display:grid; grid-template-columns:.85fr 1.15fr; gap:80px; }
.intro h2, .section-heading h2, .principles h2, .cta-box h2 { font-size:clamp(2.2rem, 4vw, 4.1rem); line-height:1.02; letter-spacing:-.05em; margin:18px 0 0; }
.intro-copy { font-size:1.08rem; color:#adbac6; max-width:640px; }
.intro-copy p:first-child { margin-top:0; color:#e5edf3; font-size:1.24rem; }

.services { padding:110px 0 125px; background:#091421; border-block:1px solid var(--line); }
.section-heading { max-width:720px; margin-bottom:48px; }
.section-heading p { color:var(--muted); font-size:1.05rem; max-width:620px; }
.card-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.service-card { min-height:300px; padding:26px; background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)); border:1px solid var(--line); border-radius:20px; position:relative; overflow:hidden; transition:.25s ease; }
.service-card::after { content:""; position:absolute; inset:auto -35px -75px auto; width:150px; height:150px; background:rgba(85,225,44,.07); border-radius:50%; filter:blur(3px); }
.service-card:hover { transform:translateY(-6px); border-color:rgba(85,225,44,.28); }
.card-number { color:#526476; font-size:.72rem; letter-spacing:.16em; font-weight:800; }
.service-icon { width:52px; height:52px; margin:48px 0 24px; display:grid; place-items:center; border-radius:14px; background:var(--green-soft); color:var(--green); font-size:1.45rem; border:1px solid rgba(85,225,44,.15); }
.service-card h3 { margin:0 0 12px; font-size:1.12rem; }
.service-card p { margin:0; color:#91a1b0; font-size:.93rem; }

.principles { padding:125px 0; }
.principles-grid { display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:center; }
.principles-copy > p { color:var(--muted); max-width:570px; }
.principle-list { margin-top:34px; border-top:1px solid var(--line); }
.principle-item { display:flex; align-items:center; gap:18px; padding:18px 0; border-bottom:1px solid var(--line); }
.principle-item span { color:var(--green); font-size:.75rem; font-weight:800; letter-spacing:.1em; }
.principle-item strong { font-size:1.04rem; }
.dashboard-card { padding:30px; border-radius:24px; border:1px solid rgba(85,225,44,.17); background:linear-gradient(145deg, #0d1b2a, #0a1420); box-shadow:var(--shadow); position:relative; overflow:hidden; }
.dashboard-card::before { content:""; position:absolute; width:250px; height:250px; border-radius:50%; right:-100px; bottom:-100px; background:rgba(85,225,44,.08); }
.dashboard-topline { display:flex; justify-content:space-between; color:#607287; font-size:.68rem; letter-spacing:.16em; font-weight:800; border-bottom:1px solid var(--line); padding-bottom:18px; }
.status { color:#a9ed99; }.status i { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 12px var(--green); margin-right:7px; }
.dashboard-main { display:grid; grid-template-columns:140px 1fr; gap:28px; align-items:center; padding:42px 0 34px; }
.metric-ring { width:130px; aspect-ratio:1; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--green) 0 78%, rgba(255,255,255,.07) 78% 100%); position:relative; box-shadow:0 0 40px rgba(85,225,44,.12); }
.metric-ring::after { content:""; position:absolute; inset:10px; border-radius:50%; background:#0c1825; }
.metric-ring span { position:relative; z-index:2; font-size:2.4rem; font-weight:900; letter-spacing:-.06em; }
.dashboard-main small { color:#65778b; letter-spacing:.16em; font-weight:800; }
.dashboard-main h3 { font-size:2rem; line-height:1.05; letter-spacing:-.04em; margin:8px 0 0; }
.dashboard-bars { display:grid; gap:17px; }
.dashboard-bars div { display:grid; grid-template-columns:95px 1fr; align-items:center; gap:14px; color:#8ea0b1; font-size:.8rem; }
.dashboard-bars i { height:7px; border-radius:999px; background:linear-gradient(90deg, var(--green) var(--value), rgba(255,255,255,.06) var(--value)); box-shadow:inset 0 0 0 1px rgba(255,255,255,.025); }

.cta-section { padding:30px 0 110px; }
.cta-box { padding:58px; border-radius:28px; display:flex; align-items:end; justify-content:space-between; gap:40px; background:linear-gradient(135deg, #10253b 0%, #0b1826 55%, rgba(38,114,38,.5) 130%); border:1px solid rgba(85,225,44,.17); }
.cta-box > div { max-width:720px; }
.cta-box p { color:#9eafbe; margin-bottom:0; }
.cta-box .btn { white-space:nowrap; }
.site-footer { border-top:1px solid var(--line); padding:30px 0; color:#74879a; font-size:.82rem; }
.footer-wrap { display:grid; grid-template-columns:1fr auto auto; gap:30px; align-items:center; }
.footer-brand img { width:34px; height:34px; }
.footer-brand { color:#d9e1e7; font-size:1rem; }

@media (max-width: 980px) {
    .hero-grid, .split-grid, .principles-grid { grid-template-columns:1fr; }
    .hero { padding-top:130px; }
    .hero-visual { min-height:auto; }
    .logo-stage { max-width:580px; }
    .card-grid { grid-template-columns:repeat(2,1fr); }
    .cta-box { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 760px) {
    .container { width:min(100% - 28px, 1160px); }
    .menu-toggle { display:block; }
    .main-nav { position:absolute; top:78px; left:14px; right:14px; display:none; flex-direction:column; align-items:stretch; gap:6px; padding:14px; background:#0a1624; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); }
    .main-nav.open { display:flex; }
    .main-nav a { padding:12px 14px; }
    .nav-cta { border-radius:10px; }
    .hero { min-height:auto; padding:120px 0 70px; }
    .hero-grid { gap:45px; }
    .hero h1 { font-size:clamp(3rem, 15vw, 5rem); }
    .hero-meta { grid-template-columns:1fr; }
    .logo-stage { border-radius:22px; }
    .intro, .services, .principles { padding:80px 0; }
    .split-grid, .principles-grid { gap:38px; }
    .card-grid { grid-template-columns:1fr; }
    .service-card { min-height:250px; }
    .service-icon { margin-top:30px; }
    .dashboard-main { grid-template-columns:1fr; }
    .cta-box { padding:34px 24px; }
    .footer-wrap { grid-template-columns:1fr; gap:10px; }
}

/* Shared LeanTech login + Projects */
.bar-94 { --value: 94%; }
.bar-86 { --value: 86%; }
.bar-100 { --value: 100%; }

.projects-section {
    padding: 120px 0;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 25%, rgba(85,225,44,.06), transparent 26rem),
        #07101d;
}
.project-card {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    min-height: 430px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(85,225,44,.18);
    background: linear-gradient(135deg, #101f2d, #0b1824);
    box-shadow: var(--shadow);
}
.project-copy { padding: clamp(34px, 5vw, 64px); align-self: center; }
.project-copy h3 { margin: 18px 0 14px; font-size: clamp(2.8rem, 6vw, 5rem); line-height: .95; letter-spacing: -.06em; }
.project-copy > p { max-width: 700px; color: #a8b6c1; font-size: 1.06rem; }
.project-badges { display:flex; flex-wrap:wrap; gap:8px; }
.project-badges span, .access-note, .access-badge {
    display:inline-flex; align-items:center; min-height:30px; padding:0 10px; border-radius:999px;
    background:rgba(255,255,255,.055); border:1px solid var(--line); color:#bfd0dc; font-size:.76rem; font-weight:800;
}
.project-badges .access-badge { background:var(--green-soft); color:#bdf8ac; border-color:rgba(85,225,44,.2); }
.project-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:30px; }
.project-no-access { color:#8293a3; font-size:.9rem; }
.project-visual { position:relative; min-height:360px; display:grid; place-items:center; background:linear-gradient(145deg, rgba(85,225,44,.10), rgba(255,175,45,.06)); overflow:hidden; }
.project-visual::before { content:""; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:34px 34px; }
.coop-mini { position:relative; z-index:1; width:250px; height:230px; border-radius:24px 24px 14px 14px; background:linear-gradient(90deg,#8f5d31,#6e4325); border:8px solid #3b2719; box-shadow:0 28px 55px rgba(0,0,0,.33); display:grid; place-items:end center; }
.coop-mini::before { content:""; position:absolute; width:105px; height:142px; left:50%; bottom:0; transform:translateX(-50%); background:#151d1a; border:9px solid #38281e; }
.coop-mini span { position:absolute; top:24px; padding:7px 12px; background:#111b17; border-radius:8px; font-weight:900; }
.coop-mini b { position:relative; z-index:2; font-size:72px; transform:translate(62px,18px); }

.auth-page, .account-page, .project-page { min-height:100vh; background:var(--bg); }
.auth-page { display:grid; place-items:center; padding:30px 16px; background:radial-gradient(circle at 50% 25%, rgba(85,225,44,.10), transparent 27rem), var(--bg); }
.auth-card { width:min(100%, 480px); padding:38px; border:1px solid rgba(85,225,44,.17); background:linear-gradient(145deg,#0e1c2b,#091522); border-radius:24px; box-shadow:var(--shadow); }
.auth-card h1 { font-size:clamp(2.5rem,8vw,4rem); letter-spacing:-.055em; line-height:1; margin:17px 0 12px; }
.auth-card > p { color:var(--muted); }
.auth-brand { display:flex; align-items:center; gap:10px; margin-bottom:32px; font-weight:900; font-size:1.15rem; }
.auth-brand img { width:42px; height:42px; object-fit:contain; }
.auth-form { display:grid; gap:16px; margin-top:26px; }
.auth-form label { display:grid; gap:7px; color:#c7d2dc; font-size:.85rem; font-weight:800; }
.auth-form input { width:100%; min-height:50px; border-radius:12px; padding:0 14px; color:#fff; background:#08131f; border:1px solid rgba(255,255,255,.12); outline:none; }
.auth-form input:focus { border-color:rgba(85,225,44,.55); box-shadow:0 0 0 3px rgba(85,225,44,.08); }
.auth-submit { width:100%; border:0; margin-top:6px; }
.auth-alert { margin-top:20px; padding:13px 14px; border-radius:12px; border:1px solid rgba(255,96,96,.28); background:rgba(170,40,40,.12); color:#ffc1c1; }
.auth-back { display:inline-block; margin-top:22px; color:#8fa1b1; font-weight:700; font-size:.88rem; }

.account-header, .project-topbar { border-bottom:1px solid var(--line); background:rgba(7,16,29,.88); backdrop-filter:blur(16px); }
.account-nav, .project-topbar-inner { min-height:78px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.account-nav form { margin:0; }
.account-main { padding-top:90px; padding-bottom:110px; }
.account-main > h1 { margin:16px 0 8px; font-size:clamp(3rem,8vw,6rem); line-height:.95; letter-spacing:-.065em; }
.account-lead { color:var(--muted); font-size:1.12rem; margin-bottom:42px; }
.account-projects { display:grid; gap:16px; }
.account-project-card, .account-empty { display:flex; align-items:center; justify-content:space-between; gap:30px; padding:30px; border-radius:20px; border:1px solid var(--line); background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.02)); }
.account-project-card h2, .account-empty h2 { margin:8px 0; font-size:1.8rem; }
.account-project-card p, .account-empty p { margin:0; color:var(--muted); }
.role-pill { display:inline-flex; min-height:27px; padding:0 9px; align-items:center; border-radius:999px; background:var(--green-soft); color:#bdf8ac; border:1px solid rgba(85,225,44,.17); font-size:.7rem; font-weight:900; letter-spacing:.1em; }

.project-top-actions { display:flex; gap:10px; }
.farm-hero { padding:90px 0; background:radial-gradient(circle at 80% 50%,rgba(89,137,59,.2),transparent 28rem),linear-gradient(180deg,#0a1721,#07101d); }
.farm-hero-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:60px; align-items:center; }
.farm-hero h1 { margin:20px 0 18px; font-size:clamp(4rem,10vw,8rem); line-height:.85; letter-spacing:-.075em; color:#f5e7c7; }
.farm-hero p { max-width:680px; color:#b3c0b4; font-size:1.1rem; }
.farm-visual { min-height:480px; display:grid; place-items:center; }
.farm-coop { position:relative; width:min(360px,80%); aspect-ratio:1.1; background:linear-gradient(90deg,#8f5b31,#693d22); border:11px solid #3d281c; border-radius:30px 30px 16px 16px; box-shadow:0 35px 70px rgba(0,0,0,.35); }
.farm-coop::before { content:""; position:absolute; left:-34px; right:-34px; top:-55px; height:88px; background:#4e2e20; clip-path:polygon(50% 0,100% 100%,0 100%); }
.farm-coop span { position:absolute; top:24px; left:50%; transform:translateX(-50%); padding:8px 14px; border-radius:9px; background:#172018; font-weight:900; }
.farm-door { position:absolute; left:50%; bottom:0; transform:translateX(-50%); width:42%; height:54%; background:#101614; border:10px solid #39271c; }
.farm-coop b { position:absolute; right:-34px; bottom:-16px; z-index:3; font-size:100px; }
.farm-features { padding:85px 0 110px; border-top:1px solid var(--line); }
.farm-feature-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.farm-feature-grid article { padding:28px; border-radius:20px; background:rgba(255,255,255,.035); border:1px solid var(--line); }
.farm-feature-grid article > span { font-size:2rem; }
.farm-feature-grid h2 { margin:20px 0 8px; }
.farm-feature-grid p { margin:0; color:var(--muted); }

@media (max-width: 980px) {
    .project-card, .farm-hero-grid { grid-template-columns:1fr; }
    .project-visual { min-height:310px; }
    .farm-feature-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
    .auth-card { padding:28px 22px; }
    .account-main { padding-top:60px; }
    .account-project-card { align-items:flex-start; flex-direction:column; }
    .farm-hero { padding:62px 0; }
    .farm-visual { min-height:330px; }
    .project-card { min-height:0; }
}

/* LeanTech Admin Panel */
.admin-page { min-height:100vh; }
.admin-main { padding-top:72px; padding-bottom:110px; }
.admin-nav-actions { display:flex; align-items:center; gap:10px; }
.admin-nav-actions form { margin:0; }
.admin-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:30px; margin-bottom:34px; }
.admin-heading h1 { margin:14px 0 8px; font-size:clamp(3.2rem,8vw,6.5rem); line-height:.9; letter-spacing:-.07em; }
.admin-heading p { margin:0; max-width:760px; color:var(--muted); font-size:1.05rem; }
.admin-badge { display:inline-flex; align-items:center; min-height:34px; padding:0 12px; border-radius:999px; background:var(--green-soft); border:1px solid rgba(85,225,44,.22); color:#c6ffb5; font-size:.72rem; font-weight:900; letter-spacing:.08em; white-space:nowrap; }
.admin-notice { margin:0 0 22px; padding:14px 16px; border-radius:13px; border:1px solid var(--line); }
.admin-notice.success { color:#c9ffc0; border-color:rgba(85,225,44,.25); background:rgba(85,225,44,.08); }
.admin-notice.error { color:#ffd0d0; border-color:rgba(255,96,96,.28); background:rgba(170,40,40,.12); }
.admin-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px; }
.admin-stats article { min-height:126px; padding:24px; border:1px solid var(--line); border-radius:19px; background:linear-gradient(145deg,rgba(255,255,255,.048),rgba(255,255,255,.018)); display:flex; flex-direction:column; justify-content:center; }
.admin-stats strong { font-size:2.6rem; line-height:1; color:#f4f7f8; }
.admin-stats span { margin-top:9px; color:var(--muted); font-weight:750; }
.admin-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr); gap:18px; align-items:start; }
.admin-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
.admin-card { padding:28px; border:1px solid var(--line); border-radius:21px; background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018)); box-shadow:0 14px 40px rgba(0,0,0,.10); }
.admin-card h2 { margin:12px 0 9px; font-size:1.75rem; letter-spacing:-.035em; }
.admin-card-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:20px; }
.admin-card-head h2 { margin-bottom:0; }
.admin-muted { color:var(--muted); }
.admin-form { display:grid; gap:15px; margin-top:22px; }
.admin-form label:not(.admin-check) { display:grid; gap:7px; color:#cbd6df; font-size:.85rem; font-weight:800; }
.admin-form input[type="text"], .admin-form input[type="email"], .admin-form input[type="password"], .admin-access-row select { width:100%; min-height:48px; padding:0 13px; color:#fff; background:#08131f; border:1px solid rgba(255,255,255,.12); border-radius:11px; outline:none; }
.admin-form input:focus, .admin-access-row select:focus { border-color:rgba(85,225,44,.55); box-shadow:0 0 0 3px rgba(85,225,44,.08); }
.admin-check { display:flex; align-items:center; gap:10px; color:#cbd6df; font-weight:750; }
.admin-check input { width:18px; height:18px; accent-color:#55e12c; }
.admin-warning { margin:20px 0 0; padding:13px 14px; border-radius:12px; color:#d8c995; background:rgba(226,176,60,.07); border:1px solid rgba(226,176,60,.18); font-size:.88rem; }
.admin-table-wrap { overflow-x:auto; }
.admin-table { width:100%; border-collapse:collapse; min-width:760px; }
.admin-table th { padding:0 12px 11px; text-align:left; color:#8294a3; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; }
.admin-table td { padding:15px 12px; border-top:1px solid var(--line); vertical-align:middle; }
.admin-table td:first-child { padding-left:0; }
.admin-table td:last-child { padding-right:0; text-align:right; }
.admin-table strong, .admin-table small { display:block; }
.admin-table small { margin-top:4px; color:var(--muted); }
.admin-statuses { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.status-chip { display:inline-flex; min-height:27px; padding:0 9px; align-items:center; border-radius:999px; border:1px solid var(--line); font-size:.69rem; font-weight:900; letter-spacing:.04em; }
.status-chip.is-active { color:#c4ffb8; background:rgba(85,225,44,.08); border-color:rgba(85,225,44,.2); }
.status-chip.is-off { color:#a3adb6; background:rgba(255,255,255,.04); }
.status-chip.is-admin { color:#b9ddff; background:rgba(57,146,230,.09); border-color:rgba(57,146,230,.2); }
.admin-role-list { display:flex; flex-wrap:wrap; gap:6px; }
.admin-small-btn { min-height:38px; padding:0 13px; }
.admin-info-card { margin-top:18px; }
.admin-role-help { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:18px; }
.admin-role-help div { padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); }
.admin-role-help strong, .admin-role-help span { display:block; }
.admin-role-help span { margin-top:5px; color:var(--muted); font-size:.9rem; }
.admin-user-heading { align-items:center; }
.admin-project-access { margin-top:18px; }
.admin-access-list { display:grid; gap:10px; }
.admin-access-row { display:grid; grid-template-columns:minmax(0,1fr) 190px auto; gap:12px; align-items:center; padding:15px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.022); }
.admin-access-row strong, .admin-access-row span { display:block; }
.admin-access-row span { margin-top:4px; color:var(--muted); font-size:.88rem; }
.admin-device-list, .admin-audit-list { display:grid; gap:9px; margin-top:16px; }
.admin-device-list article { display:grid; grid-template-columns:1.2fr .65fr .8fr; gap:12px; padding:14px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.022); }
.admin-device-list strong, .admin-device-list span, .admin-audit-list strong, .admin-audit-list span { display:block; }
.admin-device-list span, .admin-audit-list span { margin-top:3px; color:var(--muted); font-size:.82rem; word-break:break-word; }
.admin-audit-list article { padding:12px 0; border-bottom:1px solid var(--line); }
.admin-audit-list article:last-child { border-bottom:0; }

@media (max-width: 1040px) {
    .admin-grid, .admin-detail-grid { grid-template-columns:1fr; }
    .admin-stats { grid-template-columns:1fr 1fr; }
    .admin-role-help { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
    .admin-main { padding-top:52px; }
    .admin-heading { align-items:flex-start; flex-direction:column; }
    .admin-stats { grid-template-columns:1fr 1fr; }
    .admin-card { padding:22px 18px; }
    .admin-access-row { grid-template-columns:1fr; }
    .admin-device-list article { grid-template-columns:1fr; }
    .admin-nav-actions { gap:7px; }
}
@media (max-width: 430px) {
    .admin-stats { grid-template-columns:1fr; }
}


/* Admin destructive actions */
.btn-danger { background:linear-gradient(135deg,#a92d36,#d4444f); color:#fff; border-color:rgba(255,120,120,.24); box-shadow:0 12px 30px rgba(169,45,54,.18); }
.btn-danger:hover { transform:translateY(-2px); filter:brightness(1.06); box-shadow:0 16px 34px rgba(169,45,54,.26); }
.admin-danger-zone { margin-top:18px; border-color:rgba(255,96,96,.28); background:linear-gradient(145deg,rgba(150,35,45,.11),rgba(255,255,255,.016)); }
.danger-tag { color:#ff9aa1; border-color:rgba(255,96,96,.25); background:rgba(170,40,40,.10); }
.admin-danger-text { max-width:900px; color:#d6bdc0; line-height:1.65; }
.admin-delete-form { max-width:760px; }
.admin-delete-form input[type="email"] { border-color:rgba(255,96,96,.28); }
.admin-delete-form input[type="email"]:focus { border-color:rgba(255,96,96,.65); box-shadow:0 0 0 3px rgba(255,96,96,.08); }
.admin-danger-check { color:#efc4c7; }
.admin-danger-check input { accent-color:#d4444f; }

/* =========================================================
   LeanTech Admin – layout fix
   - Prevent large heading from overlapping subtitle
   - Prevent user table from forcing horizontal scrolling
   ========================================================= */

.admin-heading {
    align-items: center;
}

.admin-heading > div:first-child {
    min-width: 0;
}

.admin-heading h1 {
    margin: 10px 0 16px;
    font-size: clamp(3.2rem, 7vw, 6rem);
    line-height: 1;
    letter-spacing: -.065em;
    padding-bottom: .04em;
}

.admin-heading p {
    position: relative;
    margin: 0;
    line-height: 1.65;
}

.admin-grid,
.admin-users-card,
.admin-create-card,
.admin-table-wrap {
    min-width: 0;
}

/* The old 760px min-width was a few pixels wider than the
   available content area on common laptop/desktop widths. */
.admin-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.admin-table th,
.admin-table td {
    min-width: 0;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    width: 23%;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 24%;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 31%;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    width: 22%;
}

.admin-table td,
.admin-table small,
.admin-role-list {
    overflow-wrap: anywhere;
    word-break: normal;
}

.admin-table td:last-child .btn {
    min-width: 126px;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    white-space: nowrap;
    text-align: center;
}

/* On narrower screens, render each account as a compact card
   instead of showing a horizontal table scrollbar. */
@media (max-width: 760px) {
    .admin-heading {
        align-items: flex-start;
    }

    .admin-heading h1 {
        font-size: clamp(3rem, 15vw, 4.8rem);
        margin-bottom: 14px;
    }

    .admin-table-wrap {
        overflow: visible;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100% !important;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody {
        display: grid;
        gap: 12px;
    }

    .admin-table tr {
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: rgba(255,255,255,.022);
    }

    .admin-table td {
        padding: 8px 0;
        border-top: 0;
        text-align: left !important;
    }

    .admin-table td + td {
        border-top: 1px solid var(--line);
        margin-top: 5px;
        padding-top: 12px;
    }

    .admin-table td:last-child {
        padding-bottom: 0;
    }

    .admin-table td:last-child .btn {
        width: 100%;
        justify-content: center;
    }
}


/* =========================================================
   LeanTech Admin – project management
   ========================================================= */

.admin-project-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr);
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.admin-form textarea {
    width: 100%;
    min-height: 108px;
    padding: 12px 13px;
    resize: vertical;
    color: #fff;
    background: #08131f;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 11px;
    outline: none;
    line-height: 1.5;
}

.admin-form textarea:focus {
    border-color: rgba(85,225,44,.55);
    box-shadow: 0 0 0 3px rgba(85,225,44,.08);
}

.admin-field-help {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.45;
}

.admin-project-list,
.admin-project-members {
    display: grid;
    gap: 10px;
}

.admin-project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255,255,255,.022);
}

.admin-project-main {
    min-width: 0;
}

.admin-project-main strong {
    font-size: 1rem;
}

.admin-project-main code,
.admin-project-open code,
.admin-heading code,
.admin-role-help code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #9ec7e6;
    overflow-wrap: anywhere;
}

.admin-project-main > code {
    display: inline-block;
    margin-top: 8px;
    font-size: .78rem;
}

.admin-project-main p {
    margin: 8px 0 6px;
    color: #cbd6df;
    line-height: 1.5;
}

.admin-project-main small {
    display: block;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.admin-project-members article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.022);
}

.admin-project-members strong,
.admin-project-members span {
    display: block;
}

.admin-project-members > article > div:first-child span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .84rem;
    overflow-wrap: anywhere;
}

.admin-empty-box {
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding: 18px;
    border: 1px dashed rgba(255,255,255,.15);
    border-radius: 14px;
    background: rgba(255,255,255,.018);
}

.admin-empty-box span {
    color: var(--muted);
    line-height: 1.5;
}

.admin-project-open {
    display: grid;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.admin-project-open .btn {
    justify-self: start;
    margin-top: 4px;
}

@media (max-width: 980px) {
    .admin-project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .admin-project-row,
    .admin-project-members article {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .admin-project-row .btn,
    .admin-project-members .btn {
        width: 100%;
        justify-content: center;
    }
}


.admin-readonly-field {
    display: grid;
    gap: 7px;
}

.admin-readonly-field > span {
    color: #cbd6df;
    font-size: .85rem;
    font-weight: 800;
}

.admin-readonly-field code {
    display: block;
    min-height: 48px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 11px;
    color: #9ec7e6;
    background: rgba(8,19,31,.65);
    overflow-wrap: anywhere;
}

.admin-readonly-field small {
    color: var(--muted);
    line-height: 1.45;
}
