/* Modern EC Johnson Academy E-Dnevnik Login Portal - UNIFIED THEME */

:root {
  /* Using unified color system from unified-theme.css */
  --primary: var(--primary-color, #003d5c);
  --primary-light: var(--primary-light, #0f5a7d);
  --primary-dark: var(--primary-dark, #002a3f);
  --accent: var(--accent-color, #d4af37);
  --accent-muted: var(--accent-muted, rgba(212, 175, 55, 0.1));
  --neutral-bg: var(--bg-primary, #f8f9fa);
  --card-bg: var(--surface-primary, #ffffff);
  --text-primary: var(--text-primary, #1a1a1a);
  --text-secondary: var(--text-secondary, #666666);
  --border-color: var(--border-color, #e8e8e8);
  --success: var(--success-color, #27ae60);
  --error: var(--error-color, #e74c3c);
  --shadow-xs: var(--shadow-xs, 0 1px 3px rgba(0, 61, 92, 0.06));
  --shadow-sm: var(--shadow-sm, 0 2px 6px rgba(0, 61, 92, 0.08));
  --shadow-md: var(--shadow-md, 0 8px 16px rgba(0, 61, 92, 0.1));
  --shadow-lg: var(--shadow-lg, 0 12px 24px rgba(0, 61, 92, 0.12));
  --transition: var(--transition, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

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

html, body {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background: var(--neutral-bg);
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* ============================================================ */
/* HEADER - BRIGHT & ELEGANT */
/* ============================================================ */

.site-header {
  background: linear-gradient(135deg, #F5F8FC 0%, #F0F5FC 100%);
  border-bottom: 2px solid rgba(123, 185, 232, 0.2);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(123, 185, 232, 0.08);
}

.site-header .container {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.site-header .brand img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(123, 185, 232, 0.1));
  transition: var(--transition);
}

.site-header .brand img:hover {
  filter: drop-shadow(0 2px 4px rgba(123, 185, 232, 0.15));
}

.site-header .brand a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.3px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.site-header .brand a span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.site-header .brand a:hover {
  color: var(--primary-light);
}

.site-header nav {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  font-size: 0.9rem;
}

.site-header nav span {
  color: var(--text-secondary);
}

.site-header nav strong {
  color: var(--primary);
  font-weight: 600;
}

.site-header nav a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: rgba(123, 185, 232, 0.08);
}

.site-header nav a:hover {
  color: #FFFFFF;
  background: linear-gradient(135deg, #7CB9E8 0%, #A0D0F0 100%);
  box-shadow: 0 2px 6px rgba(123, 185, 232, 0.2);
}

/* ============================================================ */
/* LOGIN PAGE LAYOUT */
/* ============================================================ */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--neutral-bg);
}

.login-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 3rem 1rem;
}

.login-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* ============================================================ */
/* HERO SECTION */
/* ============================================================ */

.login-hero {
  padding-right: 2rem;
}

.login-hero .logo {
  width: 120px;
  height: auto;
  margin-bottom: 2rem;
  animation: slideInDown 0.6s ease-out;
}

.login-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
  animation: slideInUp 0.8s ease-out 0.1s both;
}

.login-hero .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.login-hero .features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  animation: slideInUp 0.8s ease-out 0.3s both;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 165, 199, 0.2) 0%, rgba(160, 208, 240, 0.2) 100%);
  border-radius: 8px;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-text strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.feature-text span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.academy-motto {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  font-style: italic;
  color: var(--primary);
  font-weight: 500;
  animation: slideInUp 0.8s ease-out 0.4s both;
}

/* ============================================================ */
/* LOGIN FORM */
/* ============================================================ */

.login-form-wrapper {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(123, 185, 232, 0.15);
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.8s ease-out;
}

.login-form-wrapper h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.login-form-wrapper .form-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease-out 0.2s both;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, #F8FBFF 0%, #F3F9FF 100%);
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.3px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(123, 185, 232, 0.15);
}

.form-group input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.error-message {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  display: none;
  animation: slideInDown 0.3s ease-out;
}

.form-group input.error {
  border-color: var(--error);
  background: linear-gradient(135deg, rgba(240, 128, 128, 0.08) 0%, rgba(240, 128, 128, 0.02) 100%);
}

.form-group input.error ~ .error-message {
  display: block;
}

/* ============================================================ */
/* LOGIN BUTTON */
/* ============================================================ */

.login-button {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #7CB9E8 0%, #A0D0F0 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(123, 185, 232, 0.3);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123, 185, 232, 0.4);
}

.login-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(123, 185, 232, 0.2);
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================ */
/* LOGIN HELPERS */
/* ============================================================ */

.login-helpers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.remember-me label {
  cursor: pointer;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.forgot-password a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.forgot-password a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

/* ============================================================ */
/* MESSAGE / ALERT BOXES */
/* ============================================================ */

.note {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  animation: slideInDown 0.4s ease-out;
}

.note.error {
  background: linear-gradient(135deg, rgba(240, 128, 128, 0.15) 0%, rgba(240, 128, 128, 0.05) 100%);
  color: var(--error);
  border-left: 4px solid var(--error);
}

.note.success {
  background: linear-gradient(135deg, rgba(103, 213, 181, 0.15) 0%, rgba(103, 213, 181, 0.05) 100%);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.note.info {
  background: linear-gradient(135deg, rgba(123, 185, 232, 0.15) 0%, rgba(123, 185, 232, 0.05) 100%);
  color: var(--primary);
  border-left: 4px solid var(--primary);
}

/* ============================================================ */
/* REGISTER LINK */
/* ============================================================ */

.register-link {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.register-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  margin-left: 0.3rem;
}

.register-link a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

/* ============================================================ */
/* FOOTER - BRIGHT & PREMIUM */
/* ============================================================ */

.site-footer {
  background: linear-gradient(135deg, #F5F8FC 0%, #F0F5FC 100%);
  border-top: 2px solid rgba(123, 185, 232, 0.2);
  padding: 2.5rem 1rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 3.5rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-brand strong {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.footer-brand strong:first-child {
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.footer-brand strong:nth-child(2) {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
}

.footer-brand span {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  font-style: normal;
  font-weight: 400;
}

.footer-middle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0 1rem;
}

.footer-middle p {
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0 0 0.6rem;
}

.footer-contact {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

.footer-contact a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: flex-end;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #E8F4FC 0%, #E3EFFC 100%);
  border: 2px solid rgba(123, 185, 232, 0.3);
  border-radius: 50%;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.1rem;
}

.social-link:hover {
  background: linear-gradient(135deg, #7CB9E8 0%, #A0D0F0 100%);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(123, 185, 232, 0.3);
}

.social-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.social-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  font-weight: 500;
}

/* ============================================================ */
/* ANIMATIONS */
/* ============================================================ */

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================================ */
/* RESPONSIVE DESIGN */
/* ============================================================ */

@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .login-hero {
    padding-right: 0;
    text-align: center;
  }

  .login-hero h1 {
    font-size: 2rem;
  }

  .login-hero .features {
    grid-template-columns: 1fr;
    margin-left: auto;
    margin-right: auto;
    max-width: 400px;
  }

  .site-header nav {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .login-content {
    padding: 2rem 1rem;
  }

  .login-form-wrapper {
    padding: 2rem;
    margin: 0 auto;
    max-width: 100%;
  }

  .login-hero h1 {
    font-size: 1.75rem;
  }

  .login-hero .tagline {
    font-size: 1rem;
  }

  .login-hero .logo {
    width: 100px;
  }

  .login-helpers {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .login-form-wrapper h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .site-header .container {
    padding: 0 0.75rem;
  }

  .site-header .brand a {
    font-size: 0.9rem;
  }

  .site-header nav {
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.8rem;
    align-items: flex-end;
  }

  .site-header nav a {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.9rem 0;
  }

  .site-header .container {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .site-header .brand {
    gap: 0.6rem;
  }

  .site-header .brand img {
    height: 40px;
  }

  .site-header .brand a {
    font-size: 0.8rem;
  }

  .site-header nav {
    width: 100%;
    flex-direction: row;
    gap: 0.5rem;
    font-size: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-header nav a {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .login-content {
    padding: 1.5rem 0.75rem;
  }

  .login-form-wrapper {
    padding: 1.5rem 1rem;
  }

  .login-hero h1 {
    font-size: 1.5rem;
  }

  .login-hero .logo {
    width: 80px;
    margin-bottom: 1.5rem;
  }

  .login-hero .features {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .form-group input {
    padding: 11px 12px;
    font-size: 16px;
  }

  .login-button {
    padding: 12px;
    font-size: 0.9rem;
  }

  .site-footer {
    padding: 1.5rem 0.75rem;
  }

  .footer-content {
    gap: 1rem;
  }

  .footer-brand {
    gap: 0.4rem;
  }

  .footer-brand strong {
    font-size: 0.8rem;
  }

  .footer-brand strong:first-child {
    font-size: 0.9rem;
  }

  .footer-middle {
    font-size: 0.8rem;
    padding: 0;
  }

  .footer-middle p {
    font-size: 0.8rem;
  }

  .footer-social {
    gap: 0.8rem;
  }

  .social-link {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
}

/* ============================================================ */
/* ACCESSIBILITY */
/* ============================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .form-group input {
    border-width: 3px;
  }

  .login-button {
    border: 2px solid var(--primary-dark);
  }
}

/* Light mode support - enhanced light theme */
@media (prefers-color-scheme: dark) {
  :root {
    --neutral-bg: #F5F8FC;
    --card-bg: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #8B9DC3;
    --border-color: #E8EDF5;
  }

  .form-group input {
    background: linear-gradient(135deg, #F8FBFF 0%, #F3F9FF 100%);
    color: var(--text-primary);
  }

  .form-group input:focus {
    background: #FFFFFF;
  }
}
