/* ============================================================
   Plug and Play — Mentor Network
   Design system matches the PTA/PAA and IT Park proposal decks:
   navy foundation (#253B49), purple (#6C6CD0) + yellow (#F0E545)
   accents, Protipo type.

   Drop the 6 Protipo-*.otf files into assets/fonts/ to activate
   the real brand font. Everything already works with the
   fallback stack until then — nothing breaks if they're missing.
   ============================================================ */

@font-face {
    font-family: 'Protipo';
    src: url('../fonts/Protipo-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Protipo';
    src: url('../fonts/Protipo-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Protipo';
    src: url('../fonts/Protipo-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #253B49;
    --navy-dark: #1a2b36;
    --navy-tint: #eef1f3;
    --purple: #6C6CD0;
    --purple-tint: #eeeefb;
    --yellow: #F0E545;
    --yellow-tint: #fdfbe0;
    --red: #C1443B;
    --red-tint: #fbeceb;
    --green: #3C8F6B;
    --green-tint: #e9f5f0;
    --grey-900: #1f2937;
    --grey-700: #4b5563;
    --grey-500: #6b7280;
    --grey-300: #d1d5db;
    --grey-100: #f3f4f6;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(37,59,73,0.06), 0 4px 12px rgba(37,59,73,0.08);
    --font: 'Protipo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--grey-900);
    background: var(--navy-tint);
    line-height: 1.5;
}
h1, h2, h3 { font-family: var(--font); }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.topbar { background: var(--navy); color: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 10; }
.topbar-inner {
    max-width: 1240px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
    background: var(--yellow); color: var(--navy); font-weight: 700;
    font-size: 13px; padding: 5px 8px; border-radius: 6px; letter-spacing: 0.5px; display: inline-block;
}
.brand-logo { height: 24px; width: auto; display: block; }
.brand-logo-login { height: 30px; width: auto; margin-bottom: 14px; display: inline-block; }
.brand-name { font-weight: 600; font-size: 16px; white-space: nowrap; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a {
    color: rgba(255,255,255,0.75); padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.topnav a:hover { color: var(--white); text-decoration: none; background: rgba(255,255,255,0.08); }
.topnav a.active { color: var(--navy); background: var(--yellow); }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,0.75); white-space: nowrap; }

/* Layout */
.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 24px; margin: 0; color: var(--navy); }
.page-head p.subtitle { margin: 4px 0 0; color: var(--grey-500); font-size: 14px; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; font-family: var(--font); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); text-decoration: none; color: var(--white); }
.btn-accent { background: var(--yellow); color: var(--navy); }
.btn-accent:hover { filter: brightness(0.95); text-decoration: none; }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.3); padding: 7px 14px; font-size: 13px; font-weight: 500; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: var(--white); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: #f6d9d7; text-decoration: none; color: var(--red); }
.btn-outline { background: var(--white); color: var(--navy); border: 1px solid var(--grey-300); }
.btn-outline:hover { border-color: var(--navy); text-decoration: none; color: var(--navy); }

/* Filters / search bar */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filterbar input[type=text], .filterbar select {
    padding: 10px 12px; border-radius: 8px; border: 1px solid var(--grey-300); font-size: 14px; font-family: var(--font); background: var(--white);
}
.filterbar input[type=text] { flex: 1; min-width: 220px; }

/* Table */
table.mentors { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.mentors th {
    background: var(--navy); color: var(--white); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 12px 14px;
}
table.mentors td { padding: 12px 14px; border-bottom: 1px solid var(--grey-100); font-size: 14px; vertical-align: middle; }
table.mentors tr:last-child td { border-bottom: none; }
table.mentors tr:hover td { background: var(--navy-tint); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--purple-tint); color: var(--purple); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-right: 10px; vertical-align: middle; flex-shrink: 0; }
.name-cell { display: flex; align-items: center; }
.name-cell .who .n { font-weight: 600; color: var(--grey-900); }
.name-cell .who .t { font-size: 12px; color: var(--grey-500); }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-active { background: var(--green-tint); color: var(--green); }
.badge-prospective { background: var(--yellow-tint); color: #8a7f10; }
.badge-inactive { background: var(--grey-100); color: var(--grey-500); }
.badge-onhold { background: var(--purple-tint); color: var(--purple); }
.badge-donotinvite { background: var(--red-tint); color: var(--red); }
.office-chip { display: inline-block; padding: 2px 8px; margin: 1px 2px 1px 0; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--navy-tint); color: var(--navy); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--grey-700); margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=date],
.field input[type=url], .field input[type=number], .field input[type=password], .field input[type=file],
.field select, .field textarea {
    width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--grey-300); font-size: 14px; font-family: var(--font); background: var(--white);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--grey-500); margin-top: 4px; }
.checkbox-row { display: flex; gap: 16px; flex-wrap: wrap; }
.checkbox-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; color: var(--grey-900); }
fieldset { border: 1px solid var(--grey-300); border-radius: var(--radius); padding: 16px; margin: 0 0 20px; }
legend { font-weight: 700; color: var(--navy); padding: 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--grey-100); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: var(--green-tint); color: var(--green); }
.alert-error { background: var(--red-tint); color: var(--red); }

/* Login page */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 20px; }
.auth-card { background: var(--white); border-radius: 14px; box-shadow: var(--shadow); padding: 40px; width: 100%; max-width: 380px; }
.auth-card .brand-mark { display: inline-block; margin-bottom: 14px; }
.auth-card h1 { font-size: 20px; color: var(--navy); margin: 0 0 4px; }
.auth-card p { color: var(--grey-500); font-size: 14px; margin: 0 0 24px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .btn-primary { width: 100%; justify-content: center; padding: 12px; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--grey-500); }

/* Footer */
.sitefooter { text-align: center; padding: 24px; color: var(--grey-500); font-size: 12px; }

/* Responsive */
@media (max-width: 860px) {
    .topnav { display: none; }
}
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    table.mentors { display: block; overflow-x: auto; }
    .topbar-user span { display: none; }
}
