/* Dashboard Styles */

:root {
  --bg: #f3f0e8;
  --white: #ffffff;
  --dark: #17263d;
  --muted: #697586;
  --border: rgba(10, 22, 40, 0.1);
  --shadow: 0 22px 48px rgba(10, 22, 40, 0.08);
  --off-white: #fbfaf7;
  --light-gray: #e6dfd2;
  --medium-gray: #6e7b8f;
  --navy: #0a1628;
  --gold: #c9923a;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --gold-soft: rgba(201, 146, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(201, 146, 58, 0.12), transparent 24%),
    linear-gradient(180deg, #f7f3eb 0%, #efe9dc 100%);
  color: var(--dark);
}

.wrapper {
  min-height: 100vh;
}

.content-wrapper {
  margin-left: 240px;
  margin-top: 78px;
  padding: 30px;
  min-height: calc(100vh - 78px);
  background:
    radial-gradient(circle at top right, rgba(201, 146, 58, 0.1), transparent 20%),
    linear-gradient(180deg, #f8f5ee 0%, #f1ece1 100%);
}

.dashboard-page {
  max-width: 100%;
  margin: 0;
  padding: 24px 0 32px 0;
  min-height: calc(100vh - 140px);
}

.dashboard-empty-card {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.96) 0%, rgba(16, 31, 54, 0.94) 100%);
  border: 1px solid rgba(201, 146, 58, 0.18);
  border-radius: 24px;
  padding: 48px;
  box-shadow: var(--shadow);
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.dashboard-empty-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(201, 146, 58, 0.16), transparent 26%);
  pointer-events: none;
}

.dashboard-empty-card h1 {
  margin: 0 0 16px;
  font-size: 2rem;
}

.dashboard-empty-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.dashboard-empty-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  font-size: 1rem;
}

.dashboard-quick-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.dashboard-quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dashboard-quick-link.primary {
  background: linear-gradient(135deg, #d9aa5d 0%, #c9923a 100%);
  color: #0a1628;
  box-shadow: 0 14px 26px rgba(201, 146, 58, 0.22);
}

.dashboard-quick-link.primary:hover {
  transform: translateY(-1px);
}

.loading-container,
.error-alert {
  max-width: 800px;
  margin: 0 auto;
}

.error-alert {
  background: rgba(255, 245, 245, 0.95);
  border: 1px solid rgba(245, 194, 199, 0.9);
  color: #842029;
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: 0 14px 24px rgba(132, 32, 41, 0.08);
}

@media (max-width: 768px) {
  .dashboard-page {
    padding: 16px;
  }
}

.profile-page {
  max-width: 100%;
  margin: 0 auto;
}

.career-applications-page {
  max-width: 100%;
}

.profile-card {
  background: var(--surface-strong);
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px;
  backdrop-filter: blur(16px);
}

.profile-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 2.8vw, 2.75rem);
  color: var(--navy);
  letter-spacing: -0.03em;
}

.profile-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 700px;
  font-size: 1rem;
}

.profile-grid {
  display: grid;
  gap: 24px;
}

.profile-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(249, 245, 237, 0.9) 100%);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(201, 146, 58, 0.14);
  box-shadow: 0 16px 36px rgba(10, 22, 40, 0.05);
}

.profile-section h3 {
  margin: 0 0 18px;
  font-size: 1.25rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-section-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.profile-row-three {
  grid-template-columns: 1fr 1fr;
}

.profile-row .form-group {
  margin-bottom: 18px;
}

.profile-row label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
}

.profile-row small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.profile-row input[type="text"],
.profile-row input[type="email"],
.profile-row input[type="password"],
.profile-row input[type="file"],
.profile-row select,
.profile-textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  color: var(--dark);
  box-shadow: inset 0 1px 2px rgba(10, 22, 40, 0.02);
}

.profile-row input[type="text"]:focus,
.profile-row input[type="email"]:focus,
.profile-row input[type="password"]:focus,
.profile-row input[type="file"]:focus,
.profile-row select:focus,
.profile-textarea:focus {
  outline: none;
  border-color: rgba(201, 146, 58, 0.6);
  box-shadow: 0 0 0 4px rgba(201, 146, 58, 0.12);
}

.profile-textarea {
  resize: vertical;
  font-family: inherit;
}

.simple-editor {
  display: grid;
  gap: 0.75rem;
}

.simple-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.simple-editor-toolbar .btn-secondary {
  min-width: auto;
  padding: 0.55rem 0.9rem;
}

.simple-editor-surface {
  min-height: 220px;
  padding: 14px 16px;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  color: var(--dark);
  line-height: 1.7;
  box-shadow: inset 0 1px 2px rgba(10, 22, 40, 0.02);
  outline: none;
}

.simple-editor-surface:focus {
  border-color: rgba(201, 146, 58, 0.6);
  box-shadow: 0 0 0 4px rgba(201, 146, 58, 0.12);
}

.simple-editor-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.simple-editor-surface p,
.simple-editor-surface ul,
.simple-editor-surface ol {
  margin: 0 0 0.9rem;
}

.simple-editor-surface ul,
.simple-editor-surface ol {
  padding-left: 1.35rem;
}

.profile-logo-preview {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(10, 22, 40, 0.08);
}

.profile-logo-frame {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.96) 0%, rgba(30, 45, 69, 0.94) 100%);
  border: 1px solid rgba(201, 146, 58, 0.2);
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(10, 22, 40, 0.16);
}

.profile-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.profile-logo-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-logo-meta strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.profile-logo-meta span {
  color: var(--muted);
  line-height: 1.5;
}

.hero-preview-panel {
  align-items: stretch;
}

.hero-image-frame {
  width: 220px;
  height: 180px;
  border-radius: 24px;
}

.hero-image-frame img {
  padding: 10px;
}

.profile-logo-section {
  margin-top: 24px;
}

.profile-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.profile-actions button {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 10px 24px rgba(10, 22, 40, 0.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  border-color: rgba(10, 22, 40, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #d9aa5d 0%, #c9923a 100%);
  color: #0a1628;
  border-color: rgba(201, 146, 58, 0.24);
}

.btn-secondary:hover,
.btn-primary:hover {
  transform: translateY(-1px);
}

.profile-actions-section {
  margin-top: 20px;
}

.profile-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.profile-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.profile-table th,
.profile-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
  vertical-align: middle;
}

.profile-table th {
  color: var(--navy);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(248, 245, 238, 0.95);
}

.profile-table tbody tr:last-child td {
  border-bottom: none;
}

.profile-table td input[type='text'] {
  min-height: 44px;
}

.profile-table-thumb {
  width: 72px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(248, 245, 238, 0.95);
  border: 1px solid rgba(10, 22, 40, 0.08);
  padding: 8px;
}

.profile-table-muted,
.profile-table-empty {
  color: var(--muted);
}

.profile-table-empty {
  text-align: center;
  padding: 24px 16px;
}

.profile-table-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-table-actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-table-actions-inline .btn-secondary {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-action-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-action-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.btn-danger-soft {
  background: rgba(220, 38, 38, 0.08);
  color: #b42318;
  border-color: rgba(220, 38, 38, 0.18);
}

.btn-danger-soft:hover {
  background: rgba(220, 38, 38, 0.14);
}

.profile-status {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  line-height: 1.5;
  box-shadow: 0 16px 28px rgba(10, 22, 40, 0.06);
}

.profile-status.success {
  background: #e8fff1;
  border-color: #a7f3d0;
  color: #065f46;
}

.profile-status.warning {
  background: #fff7e6;
  border-color: #f6c989;
  color: #92400e;
}

.profile-status.error {
  background: #fff5f5;
  border-color: #f5c2c7;
  color: #842029;
}

.career-applications-shell {
  display: grid;
  gap: 18px;
}

.career-applications-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(201, 146, 58, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(21, 37, 64, 0.94) 100%);
  color: #fff;
  border: 1px solid rgba(201, 146, 58, 0.16);
}

.career-applications-filter {
  min-width: 240px;
  display: grid;
  gap: 8px;
}

.career-applications-filter label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

.career-applications-filter-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(201, 146, 58, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  font-weight: 600;
  outline: none;
}

.career-applications-kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(232, 176, 96, 0.9);
  font-weight: 700;
  margin-bottom: 6px;
}

.career-applications-count {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.career-applications-wrap {
  margin-top: 0;
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(201, 146, 58, 0.16);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(10, 22, 40, 0.06);
}

.profile-table-wrap.career-applications-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.career-applications-table {
  min-width: 1120px;
}

.career-applications-mobile-list {
  display: none;
}

.career-applications-table th {
  background: linear-gradient(180deg, rgba(252, 249, 243, 0.98) 0%, rgba(245, 238, 226, 0.98) 100%);
  color: #6a4c1f;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  padding-top: 16px;
  padding-bottom: 16px;
}

.career-applications-table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
}

.career-applications-table tbody tr:hover {
  background: rgba(201, 146, 58, 0.05);
}

.career-applications-table td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.career-applicant-cell,
.career-job-cell,
.career-contact-cell,
.career-status-cell,
.career-cv-cell {
  min-width: 160px;
}

.career-applicant-name,
.career-job-title {
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}

.career-applicant-org,
.career-job-date,
.career-contact-subtle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.career-contact-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.career-contact-link:hover {
  color: var(--gold);
}

.career-experience-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(201, 146, 58, 0.12);
  border: 1px solid rgba(201, 146, 58, 0.18);
  color: #7a5314;
  font-weight: 700;
  font-size: 0.8rem;
}

.career-download-btn {
  min-height: 40px !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  text-decoration: none;
  justify-content: center;
}

.career-status-select {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 999px;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 241, 231, 0.96) 100%);
}

.career-mobile-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6a33;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-loading-text {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 768px) {
  .profile-row {
    grid-template-columns: 1fr;
  }

  .profile-logo-preview {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-section-header {
    flex-direction: column;
  }

  .career-applications-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .career-applications-filter {
    width: 100%;
    min-width: 0;
  }
}

/* Tab Navigation */
.tab-navigation {
  background: var(--off-white);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
  display: flex;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--medium-gray);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:hover {
  background: var(--light-gray);
  color: var(--dark-gray);
}

.tab-btn.active {
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.tab-btn i {
  font-size: 14px;
}
@media (max-width: 1024px) {
  .content-wrapper {
    margin-left: 0;
    padding: 24px;
  }

  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    margin-top: 78px;
    padding: 16px;
  }

  .content-header h1 {
    font-size: 24px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-value {
    font-size: 28px;
  }

  .recent-section {
    padding: 20px;
  }

  .career-applications-wrap {
    display: none;
  }

  .career-applications-mobile-list {
    display: grid;
    gap: 14px;
  }

  .career-application-mobile-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(201, 146, 58, 0.14);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(10, 22, 40, 0.06);
    display: grid;
    gap: 14px;
  }

  .career-application-mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }

  .career-application-mobile-block {
    display: grid;
    gap: 4px;
  }

  .career-application-mobile-actions {
    display: grid;
    gap: 12px;
  }

  .career-application-mobile-actions .career-download-btn,
  .career-application-mobile-actions .career-status-select {
    width: 100%;
  }
}
