/* EduNotes — shared styles (works with Tailwind CDN, no build step) */

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}
.dark .card {
    background-color: #151f32;
    border-color: rgba(51, 65, 85, 0.6);
}

.shadow-soft {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #0d9488;
    color: #fff;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
    background-color: #0f766e;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #fff;
    color: #334155;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background-color: #f8fafc;
}
.dark .btn-secondary {
    background-color: #151f32;
    color: #e2e8f0;
    border-color: #475569;
}
.dark .btn-secondary:hover {
    background-color: #1e293b;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #fef2f2;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-danger:hover {
    background-color: #fee2e2;
}
.dark .btn-danger {
    background-color: rgba(127, 29, 29, 0.3);
    color: #f87171;
}

/* Form fields */
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .input-icon {
    position: absolute;
    inset-block: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding-left: 0.875rem;
    color: #94a3b8;
    pointer-events: none;
}

.input-field {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.dark .input-field {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
    color: #f1f5f9;
}

.input-field-plain,
.select-field,
.textarea-field {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field-plain:focus,
.select-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.dark .input-field-plain,
.dark .select-field,
.dark .textarea-field {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
    color: #f1f5f9;
}
.textarea-field {
    resize: vertical;
    min-height: 6rem;
}

/* Alerts */
.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}
.dark .alert-error {
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
    border-color: rgba(127, 29, 29, 0.5);
}

.alert-success {
    background: #ecfdf5;
    color: #047857;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #a7f3d0;
}
.dark .alert-success {
    background: rgba(6, 78, 59, 0.2);
    color: #6ee7b7;
    border-color: rgba(6, 78, 59, 0.5);
}

/* Status badges */
.badge-approved {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
}
.dark .badge-approved {
    background: rgba(6, 78, 59, 0.4);
    color: #6ee7b7;
}

.badge-pending {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}
.dark .badge-pending {
    background: rgba(146, 64, 14, 0.4);
    color: #fcd34d;
}

.badge-rejected {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}
.dark .badge-rejected {
    background: rgba(127, 29, 29, 0.4);
    color: #fca5a5;
}

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s;
}
.stat-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.dark .stat-card {
    background: #151f32;
    border-color: rgba(51, 65, 85, 0.6);
}

/* Page hero */
.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), #f0fdfa, #eef2ff);
    border: 1px solid rgba(226, 232, 240, 0.6);
    padding: 2rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
    .page-hero { padding: 3rem; }
}
.dark .page-hero {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), #151f32, rgba(49, 46, 129, 0.2));
    border-color: rgba(51, 65, 85, 0.5);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
}
.data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
.data-table thead {
    background: #f8fafc;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.dark .data-table thead {
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
}
.data-table th {
    padding: 0.875rem 1.25rem;
    font-weight: 600;
}
.data-table td {
    padding: 1rem 1.25rem;
}
.data-table tbody tr {
    border-top: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.data-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.8);
}
.dark .data-table tbody tr {
    border-color: rgba(51, 65, 85, 0.6);
}
.dark .data-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.4);
}

/* Nav */
.nav-link {
    color: #475569;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
    color: #0d9488;
    background: #f1f5f9;
}
.dark .nav-link {
    color: #cbd5e1;
}
.dark .nav-link:hover {
    color: #2dd4bf;
    background: rgba(30, 41, 59, 0.8);
}

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Background pattern */
.page-bg {
    background-image: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.08) 1px, transparent 0);
    background-size: 24px 24px;
}
.dark .page-bg {
    background-image: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.04) 1px, transparent 0);
}

/* Level badge base */
.level-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-width: 1px;
}
