/* InfraKeeper admin theme — brand palette from logos/ (teal). See docs/01-arquitectura.md §1.
   The theme lives here, not per screen: tweak tokens once. */
:root {
    --ifk-primary: #0E7C66;       /* dark teal */
    --ifk-accent: #14B8A6;        /* bright teal */
    --ifk-ink: #0F2E29;           /* dark text */
    --ifk-sidebar-bg: #0F2E29;
    --ifk-sidebar-fg: #E6F2EF;
    --ifk-sidebar-active: #14B8A6;
    --ifk-bg: #F5F7F7;
    --bs-primary: var(--ifk-primary);
}

body {
    background: var(--ifk-bg);
    color: var(--ifk-ink);
}

/* ---- Admin shell: sidebar + topbar + content ---- */
.ifk-shell { display: flex; min-height: 100vh; }

.ifk-sidebar {
    width: 248px;
    background: var(--ifk-sidebar-bg);
    color: var(--ifk-sidebar-fg);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.ifk-sidebar .ifk-brand { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.ifk-sidebar .ifk-brand img { height: 34px; }
.ifk-sidebar .nav-link {
    color: var(--ifk-sidebar-fg);
    padding: .65rem 1.25rem;
    border-left: 3px solid transparent;
}
.ifk-sidebar .nav-link:hover { background: rgba(255,255,255,.06); }
.ifk-sidebar .nav-link.active {
    background: rgba(20,184,166,.12);
    border-left-color: var(--ifk-sidebar-active);
    color: #fff;
}
.ifk-portal-tag {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .6;
    padding: .25rem 1.25rem;
}

.ifk-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ifk-topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
}
.ifk-content { padding: 1.5rem; }

.btn-primary {
    --bs-btn-bg: var(--ifk-primary);
    --bs-btn-border-color: var(--ifk-primary);
    --bs-btn-hover-bg: #0c6b58;
    --bs-btn-hover-border-color: #0c6b58;
    --bs-btn-active-bg: #0c6b58;
}
a { color: var(--ifk-primary); }

/* Health pills (derived asset health — doc 05 §4) */
.ifk-health { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; }
.ifk-health-green { background: #16a34a; }
.ifk-health-yellow { background: #eab308; }
.ifk-health-red { background: #dc2626; }
.ifk-health-gray { background: #cbd5e1; }

/* ---- Auth screens (login / register / invitation): colorful brand background, no navbar ---- */
.ifk-auth-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    background:
        radial-gradient(1100px 520px at 8% -10%, rgba(20,184,166,.55) 0%, transparent 55%),
        radial-gradient(900px 480px at 110% 115%, rgba(20,184,166,.35) 0%, transparent 50%),
        linear-gradient(135deg, var(--ifk-primary) 0%, var(--ifk-ink) 100%);
}
.ifk-auth-main { width: 100%; max-width: 460px; }
.ifk-auth-main .card { border: none; border-radius: 1rem; box-shadow: 0 18px 48px rgba(0,0,0,.28); }
/* Footer (language switcher) sits on the dark background → make it readable. */
.ifk-auth-foot .text-muted { color: rgba(255,255,255,.8) !important; }
.ifk-auth-foot .btn-outline-secondary { color: #fff; border-color: rgba(255,255,255,.5); }
.ifk-auth-foot .btn-outline-secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* Clickable KPI cards on the dashboard: ink text + subtle lift on hover. */
.ifk-kpi { color: var(--ifk-ink); transition: transform .12s ease, box-shadow .12s ease; }
.ifk-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 46, 41, .12); color: var(--ifk-ink); }

/* ---- Landing / portal chooser (Home) ---- */
.ifk-landing { max-width: 1040px; margin: 0 auto; }

.ifk-hero {
    background: linear-gradient(135deg, var(--ifk-primary) 0%, var(--ifk-accent) 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 3rem 1.5rem;
    margin-top: .5rem;
    box-shadow: 0 12px 32px rgba(14,124,102,.25);
}
.ifk-hero-logo { height: 60px; max-width: 90%; }
.ifk-hero-tagline {
    margin: 1.1rem auto 0;
    max-width: 660px;
    font-size: 1.08rem;
    line-height: 1.5;
    opacity: .96;
}

.ifk-portals { padding: 2.5rem 0 1.5rem; }

.ifk-portal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: .9rem;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--ifk-ink);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ifk-portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15,46,41,.12);
    border-color: var(--ifk-accent);
    color: var(--ifk-ink);
}
.ifk-portal-ico {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,184,166,.12);
    color: var(--ifk-primary);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}
.ifk-portal-card h2 { margin-bottom: .4rem; }
.ifk-portal-desc {
    font-size: .9rem;
    color: #5b6b67;
    line-height: 1.45;
    flex: 1 1 auto;
    margin-bottom: 1rem;
}
.ifk-portal-cta { font-weight: 600; color: var(--ifk-primary); font-size: .9rem; }
.ifk-portal-card:hover .ifk-portal-cta { color: var(--ifk-accent); }
.ifk-portal-cta .bi { transition: transform .15s ease; }
.ifk-portal-card:hover .ifk-portal-cta .bi { transform: translateX(3px); }

/* Sidebar nav-link icons: fixed width so labels align. */
.ifk-sidebar .nav-link .bi { width: 1.25rem; text-align: center; margin-right: .6rem; opacity: .9; }

/* Hamburger (mobile only) + off-canvas backdrop. */
.ifk-hamburger { display: none; }
.ifk-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 46, 41, .45);
    z-index: 1040;
}

/* Mobile: the sidebar becomes an off-canvas drawer toggled by the hamburger
   (technician/customer are mobile-first). */
@media (max-width: 768px) {
    .ifk-hamburger { display: inline-flex; align-items: center; }
    .ifk-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1045;
        width: 264px;
        max-width: 82%;
        flex-direction: column;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .2s ease;
    }
    .ifk-sidebar.show { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    .ifk-backdrop.show { display: block; }
}
