:root {
  /* Institutional Colors (Selcuk University) */
  --selcuk-blue: #1c458b;
  --selcuk-blue-rgb: 28, 69, 139;
  --selcuk-blue-hover: #15386f;
  
  --color-primary: var(--selcuk-blue);
  --color-primary-hover: var(--selcuk-blue-hover);
  --color-primary-light: rgba(var(--selcuk-blue-rgb), 0.1);
  --color-secondary: #2c3e50;
  
  --bg-color: #ffffff;
  --bg-surface: #f0f5fa;
  --text-primary: #2c3e50;
  --text-secondary: #545b62;
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 2px 8px rgba(28, 69, 139, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 69, 139, 0.08);
  --shadow-lg: 0 8px 20px rgba(28, 69, 139, 0.1);
  --shadow-hover: 0 12px 28px rgba(28, 69, 139, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  overflow-x: clip;
  position: relative;
  width: 100%;
  background-color: #f4f7fa; /* Light Blue-Grey Background */
  background-image: linear-gradient(135deg, #f4f7fa 0%, #ffffff 100%);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60vmin;
  height: 60vmin;
  transform: translate(-50%, -50%);
  background-image: url('/assets/img/selcuk-logo.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

/* ─── Preloader ─── */
.preloader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.preloader-logo {
  width: 90px;
  height: 90px;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Top Progress Bar */
.top-loader {
  position: fixed;
  top: 0; left: 0; width: 0; height: 3px;
  background: var(--color-primary);
  z-index: 10001;
  box-shadow: 0 0 10px var(--color-primary-light);
  transition: width 0.4s cubic-bezier(0.1, 0.7, 1.0, 0.1);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Topbar */
.topbar {
  background: var(--selcuk-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  color: #ffffff;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.topbar-logo {
  height: 48px;
  width: auto;
  min-width: 48px;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.topbar-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions .btn-primary {
  background-color: #ffffff;
  color: var(--selcuk-blue);
  font-weight: 700;
  border: none;
}

.topbar-actions .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.topbar-actions .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.topbar-actions .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

.btn-logout {
  background-color: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.btn-logout:hover {
  background-color: #f8f9fa;
  color: var(--text-primary);
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  background-color: var(--bg-surface);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 24px 0;
}


/* ─── Toast Notification ─── */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 10005;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-msg {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 69, 139, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 380px;
  display: flex;
  gap: 16px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
}

.toast-msg::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background-color: var(--selcuk-blue);
}

.toast-msg.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  width: 44px;
  height: 44px;
  background-color: var(--color-primary-light);
  color: var(--selcuk-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--selcuk-blue);
  letter-spacing: -0.01em;
}

.toast-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toast-link {
  font-size: 12.5px;
  color: var(--selcuk-blue);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  transition: var(--transition);
}

.toast-link:hover {
  gap: 10px;
  text-decoration: underline;
}

.toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
  margin: -6px -2px 0 0;
}

.toast-close:hover {
  color: var(--selcuk-blue);
}

/* Mobile Optimizations */
@media (max-width: 600px) {
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
  .toast-msg {
    width: 100%;
    padding: 12px;
    gap: 12px;
    transform: translateY(120%);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }
  .toast-msg.show {
    transform: translateY(0);
  }
  .toast-icon {
    width: 36px;
    height: 36px;
  }
  .toast-icon svg {
    width: 20px;
    height: 20px;
  }
  .toast-title {
    font-size: 13.5px;
  }
  .toast-desc {
    font-size: 11.5px;
    line-height: 1.4;
  }
  .toast-link {
    font-size: 12px;
    margin-top: 6px;
  }
}

