@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700;800&display=swap');

:root {
  --teal: #1F6F66;
  --teal-light: #6F9F94;
  --teal-dark: #124c45;
  --navy: #1E3A4A;
  --navy-light: #2c546b;
  --orange: #E67A2E;
  --soft-orange: #EAC6AF;
  --bg: #FAF6F4;
  --bg-gradient: linear-gradient(135deg, #FAF6F4 0%, #EAC6AF 100%);
  --white: #FFFFFF;
  --text: #1E3A4A;
  --text-muted: #5A6E78;
  --ff-sans: 'Inter', sans-serif;
  --ff-serif: 'Playfair Display', serif;
  
  --shadow-sm: 0 4px 6px -1px rgba(30, 58, 74, 0.05), 0 2px 4px -1px rgba(30, 58, 74, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(30, 58, 74, 0.08), 0 4px 6px -2px rgba(30, 58, 74, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(30, 58, 74, 0.15);
  --shadow-glow: 0 0 20px rgba(31, 111, 102, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

body {
  font-family: var(--ff-sans);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 100% 0%, #EAC6AF 0%, transparent 40%),
                    radial-gradient(circle at 0% 100%, #6F9F94 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-serif);
  color: var(--navy);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--orange);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Auth Layout */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  animation: fadeIn 0.8s ease-out forwards;
}

.auth-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 3rem 4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  transition: transform 0.3s ease;
}

.auth-card.large {
  max-width: 800px;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--teal);
  font-size: 2.2rem;
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(30, 58, 74, 0.15);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  font-family: var(--ff-sans);
  font-size: 1rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(31, 111, 102, 0.15);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #adb5bd;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1 1 calc(50% - 0.75rem);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231F6F66'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  border: none;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  font-family: var(--ff-sans);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(31, 111, 102, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-dark) 0%, #0d3631 100%);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(31, 111, 102, 0.4);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange) 0%, #c46422 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(230, 122, 46, 0.3);
}

.btn-orange:hover {
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(230, 122, 46, 0.4);
}

.btn-block {
  display: block;
  width: 100%;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideDown 0.4s ease-out forwards;
}

.alert-error {
  background-color: #fff1f2;
  color: #be123c;
  border-left: 4px solid #e11d48;
}

.alert-success {
  background-color: #f0fdf4;
  color: #15803d;
  border-left: 4px solid #16a34a;
}

/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg);
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2.5rem;
}

.sidebar-header h3 {
  color: var(--white);
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.profile-pic-preview {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--teal);
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s;
}

.profile-pic-preview:hover {
  transform: scale(1.05);
}

.nav-menu {
  list-style: none;
  flex: 1;
}

.nav-menu li {
  margin-bottom: 0.5rem;
}

.nav-menu a {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
  transform: translateX(5px);
}

.main-content {
  flex: 1;
  padding: 3rem 4rem;
  overflow-y: auto;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(30, 58, 74, 0.1);
}

.topbar h2 {
  font-size: 2.2rem;
  margin: 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border: 1px solid rgba(30, 58, 74, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--teal);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--soft-orange);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.card h4 {
  font-family: var(--ff-sans);
  color: var(--navy);
  margin-bottom: 1rem;
}

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

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

/* Responsive */
@media (max-width: 992px) {
  .main-content {
      padding: 2rem;
  }
  .form-row .form-group {
      flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .dashboard-wrapper {
    flex-direction: column !important;
  }
  .sidebar {
    width: 100%;
    padding: 1.5rem;
    box-shadow: none;
  }
  .sidebar-header {
    margin-bottom: 1.5rem;
  }
  .auth-card {
    padding: 2rem;
  }
}
/* ==========================================
   GLOBAL LOADING OVERLAY
   ========================================== */

#app-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(30, 58, 74, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: overlayFadeIn 0.25s ease;
}

#app-loading-overlay.active {
    display: flex;
}

.app-loader-inner {
    text-align: center;
    padding: 3rem 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: loaderSlideUp 0.35s ease forwards;
}

.app-loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #EAC6AF;
    border-radius: 50%;
    animation: loaderSpin 0.9s linear infinite;
    margin: 0 auto 1.8rem;
}

.app-loader-title {
    font-family: var(--ff-serif);
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.app-loader-sub {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

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

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

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

/* ==========================================
   PRINT / PDF EXPORT STYLES
   ========================================== */
@media print {
    body {
        background: white !important;
        background-image: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sidebar, 
    .topbar, 
    .nav-menu, 
    .dashboard-wrapper .sidebar,
    #app-loading-overlay,
    .btn, 
    form,
    .alert,
    #chat_panel,
    #ko-modal,
    footer,
    .main-content .topbar {
        display: none !important;
    }

    .dashboard-wrapper {
        display: block !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin: 0 !important;
        padding: 1rem !important;
        width: 100% !important;
        page-break-inside: avoid;
    }

    .card h3 {
        border-bottom: 2px solid #1F6F66 !important;
        display: block !important;
        width: 100% !important;
    }

    /* Professional Report Header for PDF */
    .main-content::before {
        content: "Career 2000 - Candidate Profile Report";
        display: block;
        text-align: center;
        font-family: 'Playfair Display', serif;
        font-size: 24px;
        color: #1F6F66;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #E67A2E;
    }


    img {
        max-width: 150px !important;
        border: 1px solid #ddd !important;
    }

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

    table td {
        border-bottom: 1px solid #eee !important;
        padding: 8px !important;
    }

    a {
        text-decoration: none !important;
        color: black !important;
    }

    .card:not(:first-child) {
        margin-top: 20px !important;
    }
}
