/* CrossWind Systems - Client Portal (Staging) */

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --background: #ffffff;
    --background-light: #f8fafc;
    --background-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 4px;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-suffix {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
}

.nav-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--warning);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Page wrapper */
.page-wrapper {
    min-height: 100vh;
    padding-top: 70px;
    background: var(--background-light);
}

/* Gate / centered auth pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--background);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .logo-text {
    font-size: 1.75rem;
}

.auth-logo .logo-suffix {
    font-size: 1.75rem;
}

.auth-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--warning);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--background);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.85rem;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    color: #92400e;
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #0c4a6e;
}

/* Content cards */
.content-card {
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.content-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.content-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.content-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 3rem 0 2.5rem;
    color: white;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.page-header p {
    opacity: 0.85;
    font-size: 1rem;
}

/* Dashboard layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: calc(100vh - 70px);
}

.sidebar {
    background: var(--background-dark);
    padding: 2rem 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 10px 24px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent-color);
}

.sidebar-section {
    padding: 1.5rem 24px 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.main-content {
    padding: 2.5rem;
    background: var(--background-light);
}

/* Welcome banner */
.welcome-banner {
    background: var(--gradient);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    color: white;
    margin-bottom: 2rem;
}

.welcome-banner h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.welcome-banner p {
    opacity: 0.85;
    font-size: 0.95rem;
}

/* Monospace / code blocks */
.code-block {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.code-block p {
    margin: 0.25rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.code-block strong {
    color: var(--primary-color);
}

/* Flag display */
.flag-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.flag-box p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.flag-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--danger);
    word-break: break-all;
}

/* Directory listing */
.dir-listing {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
}

.dir-listing table {
    width: 100%;
    border-collapse: collapse;
}

.dir-listing th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.dir-listing td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.dir-listing td a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.dir-listing td a:hover {
    text-decoration: underline;
}

/* Notes / checklist */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 0.6rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist li .check {
    position: absolute;
    left: 0;
    font-weight: bold;
}

.check-done { color: var(--success); }
.check-todo { color: var(--danger); }

/* Footer */
.footer {
    background: var(--background-dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.4rem;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* Link below auth form */
.auth-footer-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}
