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

html, body {
    min-height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    background-color: #f0f2f5;
    color: #111;
}

/* TEMALAR */
body.theme-light {
    background-color: #f0f2f5;
    color: #111;
}

body.theme-dark {
    background-color: #111827;
    color: #f9fafb;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* YARDIMCI SINIFLAR */
.muted {
    color: #6b7280;
}

.small {
    font-size: 0.85rem;
}

.full-width {
    width: 100%;
}

/* BUTTONLAR */
.btn-primary {
    border: none;
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-outline-small {
    border-radius: 999px;
    border: 1px solid #2563eb;
    padding: 4px 10px;
    font-size: 0.8rem;
    background-color: transparent;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
}

.btn-outline-small:hover {
    background-color: #dbeafe;
}

/* LOGIN EKRANI */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: radial-gradient(circle at top, #2563eb 0, #0f172a 50%, #020617 100%);
}

.login-card {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 20px 22px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 4px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.login-form label {
    font-size: 0.9rem;
    font-weight: 600;
}

.login-form input {
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.login-form input:focus {
    outline: 2px solid #93c5fd;
    border-color: #2563eb;
}

.login-extra-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.link-small {
    font-size: 0.85rem;
    color: #2563eb;
}

.link-small:hover {
    text-decoration: underline;
}

/* GENEL SAYFA İSKELETİ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
}

.site-header.admin-header {
    border-bottom-color: #f97316;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-button {
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2563eb;
}

.badge-admin {
    font-size: 0.7rem;
    background-color: #f97316;
    color: #ffffff;
    padding: 3px 6px;
    border-radius: 999px;
    font-weight: 600;
}

.top-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #374151;
}

.nav-link:hover {
    background-color: #e5e7eb;
}

.nav-link.active {
    background-color: #2563eb;
    color: #ffffff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.user-email {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* LAYOUT */
.page-layout {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 12px 48px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
}

.page-layout.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.side-nav {
    align-self: flex-start;
    position: sticky;
    top: 72px;
}

.side-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.side-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.side-link {
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 8px;
    color: #374151;
    display: block;
}

.side-link:hover {
    background-color: #e5e7eb;
}

.side-link.active {
    background-color: #2563eb;
    color: #ffffff;
}

.side-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.side-box {
    margin-top: 8px;
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.side-box-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
}

/* CARD GENEL */
.page-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.card h1 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.card h3 {
    font-size: 1rem;
    margin-top: 8px;
    margin-bottom: 4px;
}

/* INFO LIST */
.info-list {
    margin-top: 6px;
    padding-left: 0;
}

.info-list li {
    margin-bottom: 4px;
}

/* DERS PROGRAMI GRID */
.schedule-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 100px repeat(5, minmax(0, 1fr));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    font-size: 0.85rem;
}

.schedule-header {
    background-color: #eff6ff;
    padding: 6px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 700;
    text-align: center;
}

.schedule-time {
    background-color: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    padding: 6px;
    font-weight: 600;
    text-align: center;
}

.schedule-cell {
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    padding: 6px;
}

.schedule-cell.empty {
    color: #9ca3af;
    text-align: center;
}

/* ADMIN ÖZET GRID */
.admin-summary .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.summary-item {
    padding: 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fee2e2, #fee8d5);
    border: 1px solid #fecaca;
}

.summary-label {
    font-size: 0.8rem;
    color: #7f1d1d;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
}

/* FORM GENEL */
.contact-form,
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.contact-form label,
.settings-form label {
    font-size: 0.9rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.settings-form input,
.settings-form textarea,
.settings-form select {
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus,
.settings-form input:focus,
.settings-form textarea:focus,
.settings-form select:focus {
    outline: 2px solid #93c5fd;
    border-color: #2563eb;
}

/* FOOTER */
.site-footer {
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px;
    background-color: #ffffff;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
}

/* RESPONSIVE */
@media (max-width: 960px) {
    .page-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .side-nav {
        position: static;
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    .top-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .header-right {
        font-size: 0.75rem;
    }
    .schedule-grid {
        font-size: 0.75rem;
        grid-template-columns: 80px repeat(5, minmax(0, 1fr));
    }
    .footer-inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}
