/* =========================================================
   EXPERTWOKA FACELIFT
   Global visual layer
   Loaded AFTER the existing compiled app.css
   ========================================================= */


/* ================================
   1. DESIGN TOKENS
   ================================ */

:root {
  --ew-navy-950: #06142f;
  --ew-navy-900: #071a35;
  --ew-navy-800: #0b2444;

  --ew-blue-700: #0d56c7;
  --ew-blue-600: #1167e8;
  --ew-blue-500: #2581f5;
  --ew-blue-100: #eaf3ff;
  --ew-blue-50: #f4f8ff;

  --ew-cyan: #35c7f4;

  --ew-slate-950: #0f172a;
  --ew-slate-900: #172033;
  --ew-slate-800: #273449;
  --ew-slate-700: #3c4b61;
  --ew-slate-600: #56657a;
  --ew-slate-500: #718096;
  --ew-slate-400: #94a3b8;
  --ew-slate-300: #cbd5e1;
  --ew-slate-200: #dfe6ef;
  --ew-slate-100: #edf2f7;
  --ew-slate-50: #f7f9fc;

  --ew-white: #ffffff;

  --ew-success: #179c62;
  --ew-warning: #f59e0b;
  --ew-danger: #dc2626;

  --ew-radius-sm: 9px;
  --ew-radius: 12px;
  --ew-radius-lg: 16px;
  --ew-radius-xl: 22px;

  --ew-shadow-sm:
    0 1px 2px rgba(15, 23, 42, .04),
    0 2px 6px rgba(15, 23, 42, .03);

  --ew-shadow:
    0 10px 30px rgba(15, 23, 42, .07);

  --ew-shadow-lg:
    0 18px 50px rgba(15, 23, 42, .10);

  --ew-container: 1200px;
}


/* ================================
   2. GLOBAL RESET / BASE
   ================================ */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: #f7f9fc;

  color: var(--ew-slate-900);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 16px;
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(17, 103, 232, .18);
  color: var(--ew-navy-950);
}


/* ================================
   3. SHARED PAGE CONTAINER
   ================================ */

.section {
  width: min(calc(100% - 40px), var(--ew-container)) !important;

  margin-left: auto !important;
  margin-right: auto !important;

  padding-top: 64px;
  padding-bottom: 64px;
}

main {
  min-height: 60vh;
}


/* ================================
   4. TYPOGRAPHY
   ================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ew-slate-950);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  letter-spacing: -.025em;
}

h1 {
  line-height: 1.08;
}

h2 {
  line-height: 1.18;
}

h3 {
  line-height: 1.28;
}

p {
  color: var(--ew-slate-600);
}


/* ================================
   5. BUTTON SYSTEM
   ================================ */

.btn,
.btn-primary,
.btn-outline,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  min-height: 44px;

  padding: 0 17px;

  border-radius: 11px;

  font-size: 14px;
  font-weight: 700;
  line-height: 1;

  text-decoration: none;

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease;
}

.btn-primary {
  border: 1px solid var(--ew-blue-600) !important;

  background: var(--ew-blue-600) !important;

  color: #ffffff !important;

  box-shadow:
    0 8px 22px rgba(17, 103, 232, .18);
}

.btn-primary:hover {
  transform: translateY(-1px);

  border-color: var(--ew-blue-700) !important;

  background: var(--ew-blue-700) !important;

  box-shadow:
    0 12px 28px rgba(17, 103, 232, .25);
}

.btn-outline {
  border: 1px solid #d9e1eb;

  background: #ffffff;

  color: var(--ew-slate-800);
}

.btn-outline:hover {
  transform: translateY(-1px);

  border-color: #bdcada;

  background: #f8fafc;

  color: var(--ew-blue-600);
}

.btn-secondary {
  border: 1px solid transparent;

  background: var(--ew-blue-50);

  color: var(--ew-blue-700);
}

.btn-secondary:hover {
  background: var(--ew-blue-100);
}


/* ================================
   6. CARD SYSTEM
   ================================ */

.card {
  border: 1px solid #e5eaf1 !important;

  border-radius: 16px !important;

  background: #ffffff !important;

  padding: 20px !important;

  box-shadow: var(--ew-shadow-sm);

  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.card:hover {
  transform: translateY(-3px);

  border-color: #d4dfec !important;

  box-shadow: var(--ew-shadow);
}


/* ================================
   7. ICON BADGES
   ================================ */

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  flex-shrink: 0;

  border-radius: 11px !important;

  background: var(--ew-blue-100) !important;

  color: var(--ew-blue-600) !important;
}


/* ================================
   8. BADGES / PILLS
   ================================ */

.ew-pill {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  padding: 5px 10px;

  border-radius: 999px;

  background: var(--ew-blue-50);

  color: var(--ew-blue-700);

  font-size: 12px;
  font-weight: 700;
}

.ew-pill-success {
  background: #ecfdf5;
  color: #128153;
}

.ew-pill-warning {
  background: #fff7e8;
  color: #c96f05;
}


/* ================================
   9. FORM ELEMENTS
   ================================ */

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;

  border: 1px solid #dbe3ed;

  border-radius: 11px;

  background: #ffffff;

  color: var(--ew-slate-900);

  font-family: inherit;

  font-size: 14px;

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}

input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 46px;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;

  border-color: rgba(17, 103, 232, .65);

  box-shadow:
    0 0 0 4px rgba(17, 103, 232, .10);
}

input::placeholder,
textarea::placeholder {
  color: #98a5b7;
}


/* ================================
   10. TABLES
   ================================ */

table {
  width: 100%;

  border-collapse: separate;
  border-spacing: 0;

  overflow: hidden;

  border: 1px solid #e6ebf2;

  border-radius: 14px;

  background: #ffffff;
}

thead {
  background: #f8fafc;
}

th {
  color: #526075;

  font-size: 12px;
  font-weight: 750;

  text-align: left;

  letter-spacing: .02em;
}

th,
td {
  padding: 13px 15px;

  border-bottom: 1px solid #edf1f5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafcff;
}


/* ================================
   11. ALERTS / FLASH MESSAGES
   ================================ */

.alert,
.flash-message {
  border-radius: 12px;

  padding: 13px 15px;

  font-size: 14px;
}

.alert-success {
  border: 1px solid #bcead5;

  background: #effbf5;

  color: #147a51;
}

.alert-error,
.alert-danger {
  border: 1px solid #f3cccc;

  background: #fff5f5;

  color: #b42318;
}


/* ================================
   12. LINKS
   ================================ */

.ew-link {
  display: inline-flex;
  align-items: center;

  gap: 7px;

  color: var(--ew-blue-600);

  font-size: 14px;
  font-weight: 700;

  transition:
    color .2s ease,
    gap .2s ease;
}

.ew-link:hover {
  gap: 10px;

  color: var(--ew-blue-700);
}


/* ================================
   13. SECTION HEADERS
   ================================ */

.ew-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;

  margin-bottom: 26px;
}

.ew-section-heading-copy {
  max-width: 680px;
}

.ew-section-kicker {
  display: inline-flex;
  align-items: center;

  gap: 7px;

  margin-bottom: 8px;

  color: var(--ew-blue-600);

  font-size: 11px;
  font-weight: 800;

  letter-spacing: .08em;
  text-transform: uppercase;
}

.ew-section-title {
  margin: 0;

  color: var(--ew-slate-950);

  font-size: clamp(25px, 3vw, 34px);

  font-weight: 800;

  letter-spacing: -.035em;
}

.ew-section-subtitle {
  margin: 9px 0 0;

  max-width: 650px;

  color: var(--ew-slate-600);

  font-size: 14px;
  line-height: 1.7;
}


/* ================================
   14. LIGHT SECTION BACKGROUNDS
   ================================ */

.ew-section-white {
  background: #ffffff;
}

.ew-section-soft {
  background:
    linear-gradient(
      180deg,
      #f8fbff 0%,
      #f5f8fc 100%
    );
}

.ew-section-blue-soft {
  background:
    radial-gradient(
      circle at 85% 0%,
      rgba(17, 103, 232, .07),
      transparent 34%
    ),
    #f8fbff;
}


/* ================================
   15. PREMIUM DARK PANEL
   ================================ */

.ew-dark-panel {
  position: relative;

  overflow: hidden;

  border-radius: 22px;

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(37, 129, 245, .22),
      transparent 30%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(53, 199, 244, .08),
      transparent 35%
    ),
    var(--ew-navy-950);

  color: #ffffff;

  box-shadow:
    0 22px 60px rgba(6, 20, 47, .14);
}

.ew-dark-panel h1,
.ew-dark-panel h2,
.ew-dark-panel h3 {
  color: #ffffff;
}

.ew-dark-panel p {
  color: #a9b7c9;
}


/* ================================
   16. EMPTY STATES
   ================================ */

.ew-empty-state {
  padding: 50px 25px;

  border: 1px dashed #d7e0eb;

  border-radius: 16px;

  background: #fbfcfe;

  text-align: center;
}

.ew-empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  margin-bottom: 14px;

  border-radius: 13px;

  background: var(--ew-blue-100);

  color: var(--ew-blue-600);
}


/* ================================
   17. PAGINATION
   ================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 40px;
  height: 40px;

  border: 1px solid #dfe6ef;

  border-radius: 10px;

  background: #ffffff;

  color: var(--ew-slate-700);

  font-size: 13px;
  font-weight: 700;
}

.pagination a:hover {
  border-color: #bdd1ea;

  color: var(--ew-blue-600);
}

.pagination .active,
.pagination [aria-current="page"] {
  border-color: var(--ew-blue-600);

  background: var(--ew-blue-600);

  color: #ffffff;
}


/* ================================
   18. SCROLLBAR
   ================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f3f6fa;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #f3f6fa;

  border-radius: 999px;

  background: #c6d0dc;
}

::-webkit-scrollbar-thumb:hover {
  background: #9eacbd;
}


/* ================================
   19. ANIMATION HELPERS
   ================================ */

@keyframes ewFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ew-fade-up {
  animation: ewFadeUp .55s ease both;
}


/* ================================
   20. FOCUS ACCESSIBILITY
   ================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(17, 103, 232, .25);
  outline-offset: 3px;
}


/* ================================
   21. RESPONSIVE
   ================================ */

@media (max-width: 900px) {
  .section {
    width: min(calc(100% - 32px), var(--ew-container)) !important;

    padding-top: 52px;
    padding-bottom: 52px;
  }

  .ew-section-heading {
    align-items: flex-start;
  }
}


@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .section {
    width: calc(100% - 28px) !important;

    padding-top: 44px;
    padding-bottom: 44px;
  }

  .ew-section-heading {
    flex-direction: column;

    gap: 15px;

    margin-bottom: 21px;
  }

  .ew-section-title {
    font-size: 26px;
  }

  .card {
    padding: 17px !important;
  }

  .btn,
  .btn-primary,
  .btn-outline,
  .btn-secondary {
    min-height: 43px;

    padding-left: 15px;
    padding-right: 15px;

    font-size: 13px;
  }
}


@media (max-width: 420px) {
  .section {
    width: calc(100% - 24px) !important;
  }

  .ew-section-title {
    font-size: 24px;
  }
}


/* ================================
   22. REDUCED MOTION
   ================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}