/* ─── Marmara University BYS Demo ─── */
/* Professional university portal aesthetic */

:root {
    --mu-navy: #003366;
    --mu-navy-light: #004a8f;
    --mu-navy-dark: #001a33;
    --mu-gold: #c8a84e;
    --mu-gold-light: #dfc06a;
    --edevlet-teal: #00838f;
    --edevlet-teal-dark: #006064;
    --fivucsas-blue: #1565c0;
    --fivucsas-blue-dark: #0d47a1;
    --bg: #eef1f5;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-light: #555770;
    --text-muted: #8b8da0;
    --border: #d5d8e0;
    --border-light: #e8eaf0;
    --success: #2e7d32;
    --danger: #c62828;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── Top Navbar ─── */
.top-navbar {
    background: linear-gradient(135deg, #002244 0%, #003d73 100%);
    color: #fff;
    height: 54px;
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--mu-gold);
    box-shadow: 0 2px 12px rgba(0,20,40,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-navbar-inner {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
}

.mu-logo-sm svg { display: block; }

.top-navbar-text { display: flex; flex-direction: column; }

.top-navbar-title {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.top-navbar-subtitle {
    font-size: 0.68rem;
    opacity: 0.7;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.top-navbar-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.top-nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.top-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.top-nav-separator { color: rgba(255,255,255,0.2); font-size: 0.8rem; }

.lang-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* ─── Login Page ─── */
.login-page {
    background: linear-gradient(180deg, #dce2ea 0%, #eef1f5 30%, #f5f6f8 100%);
}

.login-main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem 1rem 1.5rem;
    min-height: calc(100vh - 130px);
}

.login-container { width: 100%; max-width: 430px; }

/* ─── University Header ─── */
.university-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.mu-crest {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.mu-crest svg { display: block; }

.bys-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mu-navy);
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.bys-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
}

/* ─── Login Card ─── */
.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.75rem;
    box-shadow: 0 4px 24px rgba(0,30,60,0.08), 0 1px 3px rgba(0,0,0,0.04);
}

/* ─── Form ─── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 0.7rem 0.75rem 0.7rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: #fafbfc;
    transition: all 0.15s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--mu-navy-light);
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
    background: #fff;
}

.input-wrapper input::placeholder { color: var(--text-muted); }

/* ─── CAPTCHA ─── */
.captcha-area {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.captcha-area label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.captcha-image {
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
}

.captcha-image svg { display: block; }

.captcha-refresh {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f5f6f8;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.captcha-refresh:hover {
    background: #ebedf0;
    border-color: #bbb;
}

.captcha-input {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: #fafbfc;
    letter-spacing: 2px;
    font-weight: 600;
}

.captcha-input:focus {
    outline: none;
    border-color: var(--mu-navy-light);
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
    background: #fff;
}

/* ─── Giris Button ─── */
.btn-giris {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #003366, #004a8f);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-giris:hover:not(:disabled) {
    background: linear-gradient(135deg, #004a8f, #0061b2);
    box-shadow: 0 4px 12px rgba(0,51,102,0.25);
}

.btn-giris:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ─── Help Links ─── */
.help-links {
    text-align: center;
    margin-top: 1.1rem;
    font-size: 0.78rem;
}

.help-links a {
    color: var(--mu-navy-light);
    text-decoration: none;
    transition: color 0.15s;
}

.help-links a:hover { text-decoration: underline; color: var(--mu-navy); }

.link-dot { color: var(--text-muted); margin: 0 0.3rem; }

/* ─── Divider ─── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.2rem 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

/* ─── e-Devlet Button ─── */
.btn-edevlet {
    width: 100%;
    padding: 0.7rem;
    background: var(--edevlet-teal);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    position: relative;
}

.btn-edevlet:hover:not(:disabled) {
    background: var(--edevlet-teal-dark);
}

.btn-edevlet:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #607d8b;
}

.edevlet-badge {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

/* ─── FIVUCSAS Login Button ─── */
.fivucsas-login-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.fivucsas-login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    transition: opacity 0.25s;
}

.fivucsas-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,71,161,0.35);
}

.fivucsas-login-btn:hover::before { opacity: 0; }

.fivucsas-login-btn:active { transform: translateY(0); }

.fivucsas-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 0.35rem;
}

.fivucsas-btn-text { flex: 1; text-align: left; }

.fivucsas-btn-label { font-size: 0.92rem; font-weight: 700; }

.fivucsas-btn-sub { font-size: 0.68rem; opacity: 0.8; font-weight: 400; margin-top: 0.1rem; }

.fivucsas-arrow { opacity: 0.6; flex-shrink: 0; transition: transform 0.2s; }

.fivucsas-login-btn:hover .fivucsas-arrow { transform: translateX(3px); opacity: 1; }

/* ─── Demo Banner ─── */
.demo-banner {
    max-width: 430px;
    margin: 1.25rem auto 0;
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffcc02;
    border-left: 4px solid #f9a825;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    color: #7a4f01;
    line-height: 1.6;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.demo-banner-icon {
    flex-shrink: 0;
    color: #e65100;
    margin-top: 0.1rem;
}

/* ─── Footer ─── */
.page-footer {
    text-align: center;
    padding: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    margin-top: 1.5rem;
}

/* ══════════════════════════════════════════
   Dashboard / Callback shared styles
   ══════════════════════════════════════════ */

.navbar {
    background: linear-gradient(135deg, #002244, #003d73);
    color: #fff;
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--mu-gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,20,40,0.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.navbar-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #c8a84e, #b89530);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--mu-navy-dark);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.navbar-title { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.2px; }
.navbar-subtitle { font-size: 0.65rem; opacity: 0.7; letter-spacing: 0.4px; text-transform: uppercase; }
.navbar-actions { display: flex; align-items: center; gap: 1rem; }
.navbar-user { font-size: 0.85rem; opacity: 0.9; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: linear-gradient(135deg, #003366, #004a8f); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(0,51,102,0.3); }

.btn-accent { background: linear-gradient(135deg, #c8a84e, #b89530); color: var(--mu-navy-dark); }
.btn-accent:hover { box-shadow: 0 4px 12px rgba(200,168,78,0.4); }

.btn-outline { background: transparent; color: var(--mu-navy); border: 2px solid var(--mu-navy); }
.btn-outline:hover { background: var(--mu-navy); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b71c1c; }

.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }

/* ─── Cards ─── */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.card-header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mu-navy);
    background: #fafbfc;
}

.card-body { padding: 1.25rem; }

/* ─── Layout ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }

/* ─── Dashboard ─── */
.dashboard-welcome {
    background: linear-gradient(135deg, #002244, #004080);
    color: #fff;
    padding: 1.75rem 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--mu-gold);
    box-shadow: 0 4px 16px rgba(0,20,40,0.2);
}

.dashboard-welcome h1 { font-size: 1.35rem; margin-bottom: 0.2rem; }
.dashboard-welcome p { opacity: 0.8; font-size: 0.85rem; }

.student-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card { text-align: center; padding: 1.25rem; }

.stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mu-navy);
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ─── Tables ─── */
.table-wrapper { overflow-x: auto; }

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

table th {
    text-align: left;
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
    background: #f8f9fb;
    font-weight: 600;
}

table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

table tbody tr:hover { background: #f0f4f8; }

.grade-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.grade-aa { background: #e8f5e9; color: #2e7d32; }
.grade-ba { background: #f1f8e9; color: #558b2f; }
.grade-bb { background: #fff8e1; color: #f9a825; }
.grade-cb { background: #fff3e0; color: #ef6c00; }
.grade-cc { background: #fbe9e7; color: #d84315; }

/* ─── Schedule ─── */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-light);
}

.schedule-item:last-child { border-bottom: none; }

.schedule-time {
    min-width: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mu-navy);
}

.schedule-course { flex: 1; }
.schedule-course .course-name { font-weight: 600; font-size: 0.85rem; }
.schedule-course .course-room { font-size: 0.78rem; color: var(--text-light); }

/* ─── Powered By Badge ─── */
.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-light);
}

.powered-by a { color: var(--mu-navy); font-weight: 600; text-decoration: none; }
.powered-by a:hover { text-decoration: underline; }

.fivucsas-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #e3f2fd;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fivucsas-blue);
}

.fivucsas-badge .badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

/* ─── Callback Page ─── */
.callback-container {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.callback-card {
    text-align: center;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--mu-navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.token-info {
    background: #f5f6f8;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.25rem;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

.token-info dt { font-weight: 700; color: var(--mu-navy); margin-top: 0.4rem; }
.token-info dd { margin-left: 0; color: var(--text-light); margin-bottom: 0.4rem; }

.success-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.demo-notice {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffe082;
    border-left: 4px solid #f9a825;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.78rem;
    color: #7a4f01;
    margin-top: 1.25rem;
    line-height: 1.5;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .navbar { padding: 0 0.75rem; height: auto; min-height: 52px; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .navbar-subtitle { display: none; }
    .navbar-logo { width: 32px; height: 32px; font-size: 0.9rem; }
    .navbar-title { font-size: 0.85rem; }
    .navbar-actions { gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
    .navbar-user { font-size: 0.78rem; display: none; }
    .container { padding: 0.75rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .student-info-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-welcome {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1.25rem;
    }
    .dashboard-welcome h1 { font-size: 1.1rem; }
    .dashboard-welcome p { font-size: 0.78rem; }
    .card-header { font-size: 0.88rem; padding: 0.75rem 1rem; }
    table th { font-size: 0.7rem; padding: 0.5rem 0.6rem; }
    table td { font-size: 0.8rem; padding: 0.5rem 0.6rem; }
    .schedule-time { min-width: 80px; font-size: 0.78rem; }
    .schedule-course .course-name { font-size: 0.8rem; }
    .top-navbar-subtitle { display: none; }
    .top-navbar-links { gap: 0.3rem; }
    .top-nav-link { font-size: 0.72rem; padding: 0.2rem 0.35rem; }
    .login-main { padding: 1.5rem 0.75rem 1rem; }
    .powered-by { flex-direction: column; gap: 0.3rem; }
}

@media (max-width: 480px) {
    .student-info-grid { grid-template-columns: 1fr; }
    .captcha-row { flex-wrap: wrap; }
    .captcha-input { width: 100%; min-width: 0; }
    .top-navbar-title { font-size: 0.78rem; }
    .top-navbar-links .top-nav-separator { display: none; }
    .top-nav-link svg { display: none; }
}
