/* 
 * Design System for Hariharan Jeeva Platform
 * Aesthetic: Premium, Modern, Dark/Glassmorphic
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #f59e0b;
    --bg-body: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --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);
    --font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-fill-color: transparent; /* Webkit fix */
    background-clip: text;
    color: transparent;
}

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

section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Header */
header {
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

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

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, #eff6ff 0%, #ffffff 100%);
    padding-top: 80px;
}

.hero-content {
    width: 100%;
    max-width: none;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    border-color: var(--border);
    background: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-alt);
    border-color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.event-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1.5rem 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Footer */
footer {
    background: #0f172a;
    color: white;
    padding: 5rem 0;
}

footer p {
    color: #94a3b8;
}

/* Admin Sidebar */
.sidebar {
    width: 240px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    background: white;
    border-right: 1px solid var(--border);
    padding: 1.4rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar h3 {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
}

.sidebar .nav-item {
    display: block;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar .nav-item:hover {
    background: var(--bg-alt);
    color: var(--text-main);
}

.sidebar .nav-item.active {
    background: #eff6ff;
    color: var(--primary);
}

.main-content {
    margin-left: 240px;
    padding: 2rem;
    min-height: 100vh;
    background: var(--bg-alt);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-header h1 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.4rem;
}

.stat-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    margin-top: 0.75rem;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table th {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.admin-table td {
    font-size: 0.92rem;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 9px;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
}

.status-pill.inactive,
.status-pill.failed,
.status-pill.pending {
    background: #fee2e2;
    color: #991b1b;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.72);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.admin-modal.show {
    display: flex;
}

.admin-modal .card {
    max-width: 760px;
    width: min(100%, 760px);
    max-height: 92vh;
    overflow: auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    section { padding: 60px 0; }
    .hero h1 { font-size: 2.5rem; }
    
    .sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid var(--border); padding: 1rem; }
    .sidebar h3 { margin-bottom: 0.75rem; }
    .sidebar .nav-item { display: inline-flex; margin: 0 0.35rem 0.5rem 0; padding: 0.65rem 0.8rem; }
    .main-content { margin-left: 0; padding: 1rem; }
    .card { overflow-x: auto; }
    table { min-width: 760px; }
    .admin-header { align-items: flex-start; flex-direction: column; }
    .admin-header .btn { width: 100%; }
    .stats-grid,
    .settings-grid,
    .admin-form-grid,
    .admin-form-grid.three { grid-template-columns: 1fr; }
    .card { padding: 1.1rem; border-radius: 14px; }
}
