* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  min-height: 100vh;
  color: #1a1a2e;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
  background: #1e3c72;
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-bottom: 30px;
}
.top-nav .nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.top-nav .nav-left {
  display: flex;
  gap: 24px;
  align-items: center;
}
.top-nav .nav-left a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.top-nav .nav-left a:hover {
  color: #fff;
  border-bottom-color: #4fc3f7;
}
.top-nav .nav-left a.active {
  color: #fff;
  border-bottom-color: #4fc3f7;
}
.top-nav .nav-right a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.top-nav .nav-right a:hover {
  color: #fff;
}
.nav-right .admin-link {
  background: rgba(255,255,255,0.12);
  padding: 4px 12px;
  border-radius: 20px;
}
.nav-right .admin-link:hover {
  background: rgba(255,255,255,0.2);
}

/* ===== HEADER ===== */
header {
  text-align: center;
  margin-bottom: 30px;
}
header h1 {
  font-size: 2.8rem;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 5px;
  letter-spacing: -0.5px;
}
header .subtitle {
  font-size: 1.2rem;
  color: #2a5298;
  font-weight: 600;
  margin-bottom: 10px;
}
header p {
  color: #555;
  font-size: 1rem;
}

/* ===== FORM (glavni) ===== */
.form {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}
.form input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
}
.form input:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}
.form button {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #2a5298, #1e3c72);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(42, 82, 152, 0.3);
}

/* ===== EMAIL REQUEST (dashboard link) ===== */
.email-request {
  margin: 20px 0 30px 0;
  padding: 20px;
  background: #f0f4f9;
  border-radius: 12px;
  border-left: 4px solid #2a5298;
}
.email-request .form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.email-request input[type="email"] {
  flex: 1 1 250px;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
}
.email-request button {
  background: #2a5298;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.email-request button:hover {
  background: #1e3c72;
}
.email-request .hint {
  font-size: 0.8rem;
  color: #555;
  margin-top: 8px;
}

/* ===== RESULT / SCORE ===== */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: #2a5298;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.error-message {
  background: #fee;
  color: #c00;
  padding: 15px 20px;
  border-radius: 12px;
  border-left: 4px solid #c00;
  margin: 20px 0;
}
.score-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}
.score-circle {
  position: relative;
  width: 140px;
  height: 140px;
}
.score-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 10;
}
.score-progress {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1s ease;
}
.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: bold;
  color: #1a1a2e;
}
.score-grade {
  margin-top: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}
.bonus-note {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 5px;
}

/* ===== STRENGTHS SECTION (NOVO) ===== */
.strengths-section {
  background: #e8f5e9;
  border-radius: 16px;
  padding: 18px 24px;
  margin: 20px 0 25px 0;
  border-left: 5px solid #2e7d32;
}
.strengths-section h3 {
  color: #2e7d32;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.strength-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.strength-badge {
  background: #c8e6c9;
  color: #1e3c72;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}
.strength-motivation {
  font-size: 0.9rem;
  color: #2e7d32;
  margin-top: 8px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 2px solid #ddd;
}
.tab {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab:hover {
  color: #2a5298;
}
.tab.active {
  color: #2a5298;
  border-bottom-color: #2a5298;
}
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.card.fail {
  border-left: 5px solid #e53935;
  background: #fff5f5;
}
.card.warn {
  border-left: 5px solid #fb8c00;
  background: #fffaf0;
}
.card.info {
  border-left: 5px solid #2196f3;
  background: #f0f8ff;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.critical { background: #e53935; color: white; }
.badge.high { background: #ff6b35; color: white; }
.badge.medium { background: #fb8c00; color: white; }
.badge.low { background: #ffb74d; color: #333; }
.badge.info { background: #2196f3; color: white; }
.deduction {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e53935;
  background: #ffe0e0;
  padding: 4px 8px;
  border-radius: 20px;
}
.deduction.bonus {
  background: #e8f5e9;
  color: #2e7d32;
}
.card-message {
  font-size: 0.95rem;
  margin-bottom: 10px;
  line-height: 1.4;
}
.fix-desc {
  font-size: 0.85rem;
  color: #555;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 8px;
}
.no-issues {
  text-align: center;
  padding: 40px;
  color: #43a047;
  font-size: 1.1rem;
}

/* ===== FIXES TAB – EMAIL FORM ===== */
.fixes-email-form {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fixes-email-form h3 {
  color: #1e3c72;
  margin-bottom: 8px;
}
.fixes-email-form .intro {
  color: #555;
  margin-bottom: 18px;
}
.fixes-email-form .disclaimer-box {
  background: #f8f9fa;
  border-left: 4px solid #e65100;
  padding: 15px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  margin: 18px 0;
}
.fixes-email-form .disclaimer-box strong {
  color: #1e3c72;
}
.fixes-email-form .disclaimer-box ul {
  margin: 10px 0 0 20px;
  padding-left: 10px;
}
.fixes-email-form .disclaimer-box ul li {
  margin-bottom: 4px;
}
.fixes-email-form .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 20px 0;
}
.fixes-email-form .consent-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.fixes-email-form .consent-row label {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
}
.fixes-email-form .form-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.fixes-email-form .form-group input[type="email"] {
  flex: 1 1 250px;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
}
.fixes-email-form .form-group button {
  background: #2a5298;
  color: white;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.fixes-email-form .form-group button:hover {
  background: #1e3c72;
}
.fixes-email-form .status-msg {
  margin-top: 16px;
  font-weight: 500;
}
.fixes-email-form .status-msg.success {
  color: #2e7d32;
}
.fixes-email-form .status-msg.error {
  color: #c62828;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 50px;
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}
footer a {
  color: #2a5298;
}
footer .footer-copyright {
  font-size: 0.8rem;
  color: #888;
  margin-top: 8px;
  line-height: 1.6;
}
footer .footer-copyright .institution {
  font-weight: 500;
  color: #555;
}

/* ===== RESPONZIVNOST ===== */
@media (max-width: 700px) {
  .container { padding: 20px 15px; }
  .form { flex-direction: column; }
  .form button { width: 100%; }
  .tabs { flex-wrap: wrap; }
  .tab { flex: 1; text-align: center; padding: 10px 16px; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  header h1 { font-size: 2.2rem; }
  header .subtitle { font-size: 1rem; }
  .top-nav .nav-container {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    text-align: center;
  }
  .top-nav .nav-left {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .top-nav .nav-right { text-align: center; }
  .email-request .form-row { flex-direction: column; }
  .email-request input[type="email"], .email-request button { width: 100%; }
  .fixes-email-form .form-group { flex-direction: column; }
  .fixes-email-form .form-group input[type="email"],
  .fixes-email-form .form-group button { width: 100%; }
  .strength-list { gap: 6px; }
  .strength-badge { font-size: 0.75rem; padding: 3px 10px; }
}
@media (max-width: 480px) {
  header h1 { font-size: 1.8rem; }
  .score-circle { transform: scale(0.8); }
}