/* UTILITY CLASSES - Replaces all inline styles from PHP files */
.error-msg, .error-inline {
  color: red;
}

.error-msg-full {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin-bottom: 20px;
}

.success-msg, .profile-msg {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.profile-error-msg {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.profile-success-msg {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content-box {
  background: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 24px;
  cursor: pointer;
}

.modal-close-large {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
}

.password-toggle-label {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.password-input-wide {
  padding-right: 120px;
}

.photo-preview-img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
}

.star-icon {
  color: #ffc107;
  cursor: pointer;
  font-size: 18px;
  margin-left: 8px;
}

.star-icon-large {
  color: #ffc107;
  cursor: pointer;
  font-size: 20px;
}

.small-text-tip {
  margin-top:6px;
  color:#555;
  font-size:13px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-80 {
  margin-top: 80px;
}

.mt-100 {
  margin-top: 100px;
}

.btn-copy {
  margin-left: 8px;
  padding: 6px 10px;
  background: #4169e1;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.learn-more-large {
  font-size: 18px;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-green {
  background: #28a745 !important;
}

.btn-cyan {
  background: #17a2b8 !important;
}

.edit-link-inline {
  color: #4169e1;
  font-weight: 700;
  margin-right: 10px;
}

.cancel-link-inline {
  margin-left: 15px;
  color: #666;
}

/* Menu-style logout link - matches .dropdown-menu a */
.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white !important;
  padding: 12px 20px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  transition: background 0.3s, color 0.3s !important;
  background: transparent;
  border-radius: 6px;
}

.logout-link:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #cea66a !important;
}

/* Menu style for profile/logout - NEW CLASSES */
.profile-menu-link,
.logout-menu-link {
  display: inline-block !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  transition: background-color 0.3s ease !important;
  text-decoration: none !important;
}

.profile-menu-link:hover,
.profile-menu-link:active,
.logout-menu-link:hover,
.logout-menu-link:active {
  color: #0a4a60 !important;
  background-color: #cea66a !important;
}

/* Webkit override */
a:-webkit-any-link.profile-menu-link,
a:-webkit-any-link.logout-menu-link {
  color: white !important;
  text-decoration: none !important;
}

/* Override Webkit defaults for profile/logout links */
a:-webkit-any-link.profile-link,
a:-webkit-any-link.logout-link,
a:-webkit-any-link.dropdown-link {
  color: inherit !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.logout-link i {
  font-size: 16px;
}

.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-greeting {
  color: white;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.3s, color 0.3s;
}

.user-greeting:hover {
  background: rgba(206, 166, 106, 0.2);
  color: #0a4a60;
}

.user-greeting i {
  font-size: 16px;
}

.dropdown-menu {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  background: #0a4a60 !important;
  border-radius: 10px !important;
  min-width: 150px !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25) !important;
  padding: 8px 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-10px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
  z-index: 1001 !important;
  display: none !important;
}

.dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.dropdown-menu a,
.dropdown-menu .dropdown-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: white !important;
  padding: 12px 20px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  white-space: nowrap !important;
  transition: background 0.3s, color 0.3s !important;
}

.dropdown-menu a:hover,
.dropdown-menu .dropdown-link:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #cea66a !important;
}

.dropdown-menu a:last-child,
.dropdown-menu .dropdown-link:last-child {
  border-bottom: none !important;
}

.dropdown-menu i {
  font-size: 16px !important;
  width: 20px !important;
}

.dropdown-menu .dropdown-link i {
  font-size: 16px;
  width: 20px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: inline-block;
}

.tab-btn-blue {
  background: #17a2b8;
}

.tab-btn-purple {
  background: #4169e1;
}

.tab-btn-red {
  background: #dc3545;
}

.form-field {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  width: 100%;
}

.form-field:focus {
  border-color: #4169e1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(65,105,225,0.1);
}

.nav-links-inline {
  margin-bottom: 15px;
}

.hr-divider {
  margin: 40px 0;
  border: none;
  height: 2px;
  background: #eee;
}

.back-link {
  display: inline-block;
  padding: 12px 24px;
  background: #4169e1;
  color: white;
  text-decoration: none;
  border-radius: 8px;
}

.form-required {
  color: red;
}

/* Navigation consistency - nav-link class */
.navbar {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nav-link:hover {
  color: #0077cc;
}

/* Override for existing navbar theme compatibility */
.nav-menu .nav-link,
.sub-menu .nav-link {
  color: white;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.nav-menu .nav-link.active,
.nav-menu .nav-link:hover,
.sub-menu .nav-link:hover {
  background-color: #cea66a;
  color: #0a4a60;
}

/* Error message styling */
.error-message {
  color: red;
}

/* Nav links margin */
.nav-links {
  margin-bottom: 15px;
}

/* Photo preview styling */
.photo-preview {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
}

/* Edit link styling */
.edit-link {
  color: #4169e1;
  font-weight: 700;
  margin-right: 10px;
}

/* Cancel link styling */
.cancel-link {
  margin-left: 15px;
  color: #666;
}

/* Job date styling */
.job-date {
  margin-top: 6px;
  color: #555;
  font-size: 13px;
}

/* Forgot form container */
.forgot-form {
  max-width: 400px;
  margin: 100px auto;
  padding: 20px;
}

/* Success message styling */
.success-message {
  padding: 15px;
  background: #d4edda;
  color: #155724;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Knowledge page styling */
.knowledge-title {
  margin: 0;
}

.knowledge-description {
  margin: 5px 0 0 0;
  color: #666;
}

.star-icon {
  color: #ffc107;
  cursor: pointer;
  font-size: 20px;
}

/* Subject page styling */
.content {
  margin-top: 80px;
}

/* Profile page styling */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.inline-form {
  display: inline;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
}

.cv-preview-content {
  text-align: center;
}

.cv-preview-margin {
  margin-top: 20px;
}

/* Login page styling */
.password-container {
  position: relative;
}

.show-password-checkbox {
  margin-right: 5px;
}

.forgot-link {
  color: #4169e1;
  text-decoration: none;
}

/* Register page styling */
.register-content {
  margin-top: 100px;
}

/* Export PDF button */
.export-pdf-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  margin-left: 20px;
}

.cv-preview-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.cv-preview-content {
  background: white;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.template-btn {
  background: #4169e1;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  margin: 0 10px;
  cursor: pointer;
  font-size: 18px;
}

/* News page styling */
.news-container {
  margin-top: 20px;
}

.news-title {
  margin-top: 0;
}

/* ============================================
   CV TEMPLATE STYLES - 14 Attractive Templates
   ============================================ */

/* Base CV Preview */
.cv-preview {
  padding: 40px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: white;
  color: #333;
  line-height: 1.6;
}

.cv-preview-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cv-preview h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.cv-preview h2 {
  font-size: 18px;
  margin: 20px 0 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cv-preview ul {
  list-style: none;
  padding: 0;
}

.cv-preview li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.cv-preview-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
}

.cv-preview-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 1. Modern Blue */
.cv-preview.modern-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}
.cv-preview.modern-blue h2 { border-bottom: 2px solid rgba(255,255,255,0.3); }
.cv-preview.modern-blue li { border-color: rgba(255,255,255,0.2); }

/* 2. Professional Gray */
.cv-preview.professional-gray {
  background: #f8f9fa;
  color: #2c3e50;
}
.cv-preview.professional-gray h2 { color: #34495e; border-bottom: 2px solid #3498db; }
.cv-preview.professional-gray .cv-preview-photo { border: 4px solid #3498db; }

/* 3. Executive Black */
.cv-preview.executive-black {
  background: #1a1a1a;
  color: #f5f5f5;
}
.cv-preview.executive-black h2 { color: #d4af37; border-bottom: 2px solid #d4af37; }
.cv-preview.executive-black .cv-preview-photo { border: 4px solid #d4af37; }

/* 4. Creative Gradient */
.cv-preview.creative-gradient {
  background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
  color: #2d3436;
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.cv-preview.creative-gradient h2 { background: rgba(255,255,255,0.3); padding: 5px 10px; }

/* 5. Clean Minimal */
.cv-preview.clean-minimal {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
}
.cv-preview.clean-minimal h2 { 
  color: #333; 
  border: none; 
  font-weight: 300;
}
.cv-preview.clean-minimal .cv-preview-photo { border-radius: 0; }

/* 6. Corporate Gold */
.cv-preview.corporate-gold {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
}
.cv-preview.corporate-gold h2 { 
  border-bottom: 3px solid #ffd700; 
  color: #ffd700;
}
.cv-preview.corporate-gold .cv-preview-photo { 
  border: 4px solid #ffd700; 
  border-radius: 8px;
}

/* 7. ATS Safe */
.cv-preview.ats-safe {
  background: white;
  color: #000;
  font-size: 14px;
}
.cv-preview.ats-safe h2 { 
  font-size: 14px; 
  font-weight: bold; 
  text-decoration: underline;
}

/* 8. Elegant Purple */
.cv-preview.elegant-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
}
.cv-preview.elegant-purple h2 { border-bottom: 2px solid #e0aaff; }
.cv-preview.elegant-purple li { border-color: rgba(255,255,255,0.15); }

/* 9. Ocean Breeze */
.cv-preview.ocean-breeze {
  background: linear-gradient(180deg, #48c6ef 0%, #6f86d6 100%);
  color: white;
}
.cv-preview.ocean-breeze h2 { color: #e8f4f8; border-bottom: 2px solid rgba(255,255,255,0.4); }

/* 10. Sunset Orange */
.cv-preview.sunset-orange {
  background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
  color: white;
}
.cv-preview.sunset-orange h2 { color: #2d2006; }
.cv-preview.sunset-orange .cv-preview-photo { border: 4px solid white; }

/* 11. Forest Green */
.cv-preview.forest-green {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
  color: white;
}
.cv-preview.forest-green h2 { border-bottom: 2px solid #98d8aa; }

/* 12. Midnight Dark */
.cv-preview.midnight-dark {
  background: #0f0c29;
  background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
  color: #e0e0e0;
}
.cv-preview.midnight-dark h2 { color: #00d2ff; }
.cv-preview.midnight-dark .cv-preview-photo { border: 3px solid #00d2ff; }

/* 13. Minimalist White */
.cv-preview.minimalist-white {
  background: #ffffff;
  color: #333;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.cv-preview.minimalist-white h2 { 
  font-weight: 400; 
  font-size: 14px; 
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  color: #999;
}
.cv-preview.minimalist-white .cv-preview-photo { border-radius: 0; }

/* 14. Corporate Blue */
.cv-preview.corporate-blue {
  background: #003366;
  color: white;
}
.cv-preview.corporate-blue h2 { 
  border-bottom: 2px solid #ffa500;
  color: #ffa500;
}
.cv-preview.corporate-blue .cv-preview-photo { border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .cv-preview { padding: 20px; }
  .cv-preview h1 { font-size: 22px; }
  .cv-preview h2 { font-size: 16px; }
  .cv-preview .cv-preview-photo { width: 80px; height: 80px; }
}
