/* Heron Platform - Main Stylesheet
   Extracted from inline template styles for maintainability */

:root {
    --primary: #1a1a2e;
    --accent: #0f3460;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #2d3436;
    --muted: #636e72;
    --border: #dfe6e9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation */
nav {
    background: var(--primary);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
nav .logo {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}
nav .logo span { color: #e94560; }
nav .nav-links { display: flex; gap: 1.5rem; align-items: center; }
nav .nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
}
nav .nav-links a:hover { color: #fff; }

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Typography */
h1 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary); }
h2 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--primary); }

/* Flash Messages */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.flash.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash.info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15,52,96,0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn.loading { opacity: 0.6; pointer-events: none; }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pass { background: #d4edda; color: #155724; }
.badge-fail { background: #f8d7da; color: #721c24; }
.badge-none { background: #e2e3e5; color: #383d41; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Utility Classes */
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.flex { display: flex; align-items: center; gap: 0.75rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card { width: 100%; max-width: 420px; }

/* Error Pages */
.error-page {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.error-page .msg { font-size: 1.1rem; color: var(--muted); margin: 0.5rem 0 1.5rem; }

/* Responsive */
@media (max-width: 768px) {
    nav { padding: 0 1rem; }
    nav .nav-links { gap: 0.5rem; }
    nav .nav-links a { font-size: 0.8rem; }
    .container { padding: 1rem; }
    .grid-2 { grid-template-columns: 1fr; }
    table { font-size: 0.8rem; }
    th, td { padding: 0.4rem 0.5rem; }
    h1 { font-size: 1.3rem; }
}
