:root {
    --bg-primary: #0b0f17;
    --bg-secondary: #131b2e;
    --bg-card: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --border: #1e293b;
    --border-light: #334155;
    --font-family: 'Rubik', 'Outfit', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.45;
    font-size: 0.875rem; /* Clean 14px default */
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

/* Header styling */
header {
    background-color: rgba(11, 15, 23, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.5rem 1.5rem; /* Shrunk padding */
}

.header-container {
    max-width: 1000px; /* Shrunk container */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.15rem; /* Shrunk logo font */
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: -0.025em;
}

.logo span {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem; /* Shrunk nav font */
}

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

/* Professional solid button */
.btn-cta {
    background-color: var(--accent);
    color: white;
    padding: 0.4rem 0.95rem; /* Shrunk button padding */
    border-radius: 0.25rem; /* Cleaner smaller corners */
    font-weight: 500;
    font-size: 0.85rem; /* Shrunk button font */
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    display: inline-block;
    text-align: center;
}

.btn-cta:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Container helper */
.main-container {
    max-width: 1000px; /* Compact page width */
    margin: 0 auto;
    padding: 2rem 1.25rem; /* Reduced padding */
}

/* Hero section */
.hero {
    text-align: center;
    padding: 3.5rem 1rem; /* Compact hero padding */
}

.hero-title {
    font-size: 2.2rem; /* Reduced hero title size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 0.95rem; /* Compact subtitle text */
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 2rem auto;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 0.55rem 1.5rem; /* Smaller call to action buttons */
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

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

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Features Grid */
.features-section {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: 1.45rem; /* Shrunk section titles */
    font-weight: 700;
    margin-bottom: 1.75rem;
    color: var(--text-primary);
}

.section-title span {
    color: var(--accent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Narrower columns */
    gap: 1.25rem;
}

.feature-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.375rem; /* Shrunk border radius */
    padding: 1.5rem; /* Shrunk padding */
    text-align: right;
    transition: border-color 0.15s ease-in-out;
}

.feature-card:hover {
    border-color: var(--border-light);
}

.feature-icon {
    font-size: 1.5rem; /* Smaller icons */
    margin-bottom: 0.75rem;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1rem; /* Compact card title */
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.825rem; /* Compact card text */
    line-height: 1.4;
}

/* Specs Section */
.specs-section {
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    padding: 1.75rem; /* Shrunk specs container padding */
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.specs-content {
    flex: 1;
    min-width: 280px;
}

.specs-content h2 {
    font-size: 1.3rem; /* Shrunk title */
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.specs-list {
    list-style: none;
}

.specs-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem; /* Smaller specs points */
}

.specs-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 0.95rem;
}

.specs-image {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Compact device mockup */
.device-mockup {
    background: #1e293b;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem; /* Normal corners */
    width: 200px; /* Reduced width */
    height: 360px; /* Reduced height */
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
}

.mockup-screen {
    background: #090d16;
    border-radius: 0.375rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

/* Enrollment, Setup and Login Containers */
.enroll-container, .setup-container, .login-container {
    max-width: 420px; /* Narrower container */
    margin: 2rem auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 1.75rem; /* Reduced padding */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login-container {
    max-width: 360px; /* Tight login screen */
}

.enroll-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.enroll-header h1 {
    font-size: 1.45rem; /* Smaller text */
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.enroll-header p {
    color: var(--text-secondary);
    font-size: 0.825rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.825rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem; /* Smaller inputs */
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

.error-msg {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

/* Steps list */
.steps-list {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.steps-list h3 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.step-text h4 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.step-text p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Dashboard styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 1.25rem; /* Shrunk padding */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem;
}

.card h2 {
    font-size: 1.05rem; /* Shrunk card title */
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.6rem 0.85rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.flash-error {
    background-color: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 0.6rem 0.85rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    margin-top: 0.5rem;
}

th, td {
    padding: 0.5rem 0.7rem; /* Shrunk cells */
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
}

td {
    font-size: 0.85rem;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.status-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge.active {
    background-color: rgba(16, 185, 129, 0.08);
    color: #34d399;
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
}

.status-badge.enrolled {
    background-color: rgba(56, 189, 248, 0.08);
    color: var(--accent);
}

.status-badge.checked_out {
    background-color: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 0.2rem;
}

.token-display {
    font-family: monospace;
    background-color: var(--bg-primary);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    color: var(--accent);
}

/* Form styling */
.form-row {
    margin-bottom: 0.85rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.form-input {
    width: 100%;
    padding: 0.45rem 0.65rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}
