@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
    --border: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn, .btn-primary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.auth-form button,
.btn-primary {
    background: var(--primary);
    color: white !important;
}

.auth-form button:hover,
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.auth-form button:active,
.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Cards & Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tables */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

code {
    background: var(--bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85em;
    word-break: break-all;
    max-width: 200px;
    display: inline-block;
    vertical-align: middle;
    color: var(--primary);
    border: 1px solid var(--border);
}

.license-key-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-hint {
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--text-muted);
}

.copy-hint:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
}

/* Auth Pages Premium Style */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #e0e7ff 0%, #f3f4f6 50%);
    padding: 24px;
}

.auth-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-card {
    background: var(--card-bg);
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.auth-card h2 {
    margin-bottom: 8px;
    text-align: center;
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9fafb;
    color: var(--text-main);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-form button {
    margin-top: 12px;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.auth-links {
    margin-top: 32px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.back-link {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-main);
}

.error-badge {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #fee2e2;
    font-weight: 500;
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.success { color: var(--success); font-size: 0.9rem; margin-bottom: 1rem; }

/* Admin Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--card-bg);
    border-color: var(--border) var(--border) var(--card-bg);
    color: var(--primary);
}
