/* MaaS Teradyne — Estilos
   Power Projects LA
*/

:root {
    --tradyne-blue: #1f4ea1;
    --tradyne-blue-dark: #163a7a;
    --tradyne-blue-light: #4a7ec9;
    --bg: #f4f6fa;
    --surface: #ffffff;
    --text: #1a202c;
    --text-muted: #5a6478;
    --border: #e1e5ed;
    --ok: #1c8a4c;
    --ok-bg: #e3f5ec;
    --err: #c0392b;
    --err-bg: #fbe4e1;
    --info: #2b6cb0;
    --info-bg: #e1edf8;
    --shadow: 0 2px 8px rgba(20, 40, 80, 0.06);
    --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
}

a { color: var(--tradyne-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ====== TOPBAR ====== */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-logo { height: 28px; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-tag {
    background: var(--info-bg);
    color: var(--info);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.btn-link {
    color: var(--text-muted);
    font-size: 14px;
}

/* ====== CONTAINER ====== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
}

/* ====== HERO ====== */
.hero-banner {
    background: linear-gradient(135deg, var(--tradyne-blue) 0%, var(--tradyne-blue-dark) 100%);
    color: white;
    padding: 32px;
    border-radius: var(--radius);
    margin-bottom: 28px;
}
.hero-banner h1 {
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 600;
}
.hero-banner .lead {
    margin: 0;
    opacity: 0.92;
    font-size: 15px;
}

/* ====== STATUS GRID ====== */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--text-muted);
}
.status-card h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.status-card .status-val {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 600;
}
.status-card .status-note {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}
.status-ok   { border-left-color: var(--ok);   }
.status-ok   .status-val { color: var(--ok); }
.status-err  { border-left-color: var(--err);  }
.status-err  .status-val { color: var(--err); }
.status-info { border-left-color: var(--info); }
.status-info .status-val { color: var(--info); }

/* ====== INFO BOX ====== */
.info-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.info-box h2 {
    margin: 0 0 14px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--tradyne-blue);
}
.info-table {
    width: 100%;
    border-collapse: collapse;
}
.info-table th, .info-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.info-table th {
    width: 220px;
    color: var(--text-muted);
    font-weight: 500;
}
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: none; }

.fase-list {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 14px;
}
.fase-list li {
    padding: 4px 0;
    color: var(--text);
}
.fase-list strong { color: var(--tradyne-blue); }

/* ====== FOOTER ====== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ====== LOGIN ====== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--tradyne-blue) 0%, var(--tradyne-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 36px 32px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.login-brand {
    text-align: center;
    margin-bottom: 24px;
}
.login-logo {
    max-height: 50px;
    width: auto;
    margin-bottom: 12px;
}
.login-brand h1 {
    margin: 0;
    font-size: 28px;
    color: var(--tradyne-blue);
    font-weight: 700;
    letter-spacing: 1px;
}
.login-sub {
    margin: 4px 0 0 0;
    color: var(--text-muted);
    font-size: 13px;
}
.login-form label {
    display: block;
    margin-bottom: 14px;
}
.login-form label span {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.login-form input[type=text],
.login-form input[type=password] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
}
.login-form input:focus {
    outline: none;
    border-color: var(--tradyne-blue);
    box-shadow: 0 0 0 3px rgba(31, 78, 161, 0.12);
}
.btn-primary {
    width: 100%;
    padding: 11px;
    background: var(--tradyne-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}
.btn-primary:hover { background: var(--tradyne-blue-dark); }

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error {
    background: var(--err-bg);
    color: var(--err);
    border: 1px solid #f0c3bd;
}

.login-footer {
    text-align: center;
    margin-top: 18px;
    color: var(--text-muted);
}
