* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    min-height: 100vh;
    color: #e2e8f0;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.org-brand {
    display: inline-block;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 2rem;
    color: #38bdf8;
    margin-bottom: 0.5rem;
}

header .subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
}

header .instructor {
    color: #7dd3fc;
    font-size: 0.95rem;
    margin-top: 0.35rem;
    font-weight: 600;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

nav a {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    transition: all 0.2s;
}

nav a:hover, nav a.active {
    background: #38bdf8;
    color: #0f172a;
}

.card {
    background: rgba(30, 41, 59, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card h2 {
    color: #38bdf8;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card h3 {
    color: #7dd3fc;
    margin: 1rem 0 0.5rem;
}

.card.success {
    border-color: #22c55e;
}

.card.error {
    border-color: #ef4444;
}

.warning-banner {
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

label {
    font-weight: 600;
    color: #cbd5e1;
}

input[type="text"],
input[type="password"],
input[type="search"] {
    padding: 0.75rem 1rem;
    border: 2px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #38bdf8;
}

button, .btn {
    padding: 0.75rem 1.5rem;
    background: #38bdf8;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s;
}

button:hover, .btn:hover {
    background: #7dd3fc;
}

.btn-secondary {
    background: transparent;
    color: #38bdf8;
    border: 2px solid #38bdf8;
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #0f172a;
    border-left: 4px solid #38bdf8;
}

.result.error {
    border-left-color: #ef4444;
    color: #fca5a5;
}

.result.success {
    border-left-color: #22c55e;
    color: #86efac;
}

.code-block {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    color: #a5f3fc;
}

.code-block .comment {
    color: #64748b;
}

.code-block .danger {
    color: #f87171;
}

.code-block .success {
    color: #4ade80;
}

.hint {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-danger {
    background: #7f1d1d;
    color: #fca5a5;
}

.badge-safe {
    background: #14532d;
    color: #86efac;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}

th {
    color: #38bdf8;
    font-weight: 600;
}

tr:hover {
    background: rgba(56, 189, 248, 0.05);
}

.payload-list {
    list-style: none;
}

.payload-list li {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #0f172a;
    border-radius: 8px;
    border: 1px dashed #475569;
}

.payload-list code {
    color: #fbbf24;
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
}

.step-list {
    counter-reset: step;
    list-style: none;
}

.step-list li {
    counter-increment: step;
    padding: 0.75rem 0 0.75rem 2.5rem;
    position: relative;
    border-bottom: 1px solid #334155;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.8rem;
    height: 1.8rem;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.lesson-card {
    display: block;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}

.lesson-card:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.lesson-card h3 {
    color: #38bdf8;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.lesson-card p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.lesson-num {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.field-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #334155;
    color: #cbd5e1;
}

.field-badge.key {
    background: #713f12;
    color: #fde68a;
}

.field-badge.type {
    background: #1e3a5f;
    color: #7dd3fc;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.info-box {
    background: #0f172a;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #334155;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.info-value {
    display: block;
    font-size: 1rem;
    color: #38bdf8;
    font-weight: 600;
    word-break: break-all;
}

.schema-tree {
    font-family: 'Consolas', monospace;
    background: #0f172a;
    padding: 1.25rem;
    border-radius: 8px;
    line-height: 1.8;
}

.tree-db {
    color: #38bdf8;
    font-weight: 700;
    font-size: 1.05rem;
}

.tree-table {
    color: #7dd3fc;
    margin-left: 0.5rem;
}

.tree-col {
    color: #94a3b8;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.tree-col em {
    color: #64748b;
    font-style: normal;
}

.schema-visual {
    overflow-x: auto;
}

.schema-table-card code {
    color: #fbbf24;
}


.sql-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: #1a1a2e;
    border-radius: 8px;
    border: 1px solid #ef4444;
}

.sql-preview h4 {
    color: #f87171;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    color: #64748b;
    font-size: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

footer .footer-brand {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

footer strong {
    color: #38bdf8;
}
