/* ==========================================================================
   1. Modern Design Tokens & Reset
   ========================================================================== */
:root {
    --primary: #4f46e5;         /* Elegant Indigo */
    --primary-hover: #4338ca;   
    --secondary: #0f172a;       /* Deep Slate Blue */
    --background: #f8fafc;      /* Soft Light Gray */
    --surface: #ffffff;         /* Pure White for cards/containers */
    --text-main: #334155;       /* Readable Dark Gray */
    --text-muted: #64748b;      /* Muted Gray for subtitles */
    --radius: 12px;             /* Smooth Rounded Corners */
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px;
}

/* ==========================================================================
   2. Clean Typography
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   3. Beautiful UI Components (Buttons, Images, Tables)
   ========================================================================== */
/* Automatic Cards: Applies to any standalone section/div */
.card, section {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

/* Modern Inputs & Buttons */
button, .btn, input[type="submit"] {
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

button:hover, .btn:hover, input[type="submit"]:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px); /* Slight lifting effect */
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Clean, Readable Tables (Fixed & Restored) */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 14px 20px;
    text-align: left;
}

th {
    background-color: var(--secondary);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

/* ==========================================================================
   4. Layout Framework & Responsiveness
   ========================================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Grid layout for side-by-side elements */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}