/* RDA Application Styles */

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-LightItalic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-BookItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-BlackItalic.otf") format("opentype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* ------------------- */
/* --- Root & Base --- */
/* ------------------- */

:root {
  --rda-blue: #0057a3;
  --rda-green: #1ea8e0;
  --rda-dark: #0b2447;
  --rda-gray: #556375;
  --rda-light-gray: #f1f7fb;
  --rda-border: #c7d8e5;
  --navbar-height: 64px;
  --navbar-height-mobile: 56px;
  --transition-speed: 200ms;
}

* {
  box-sizing: border-box;
}

body {
  padding-top: var(--navbar-height);
  font-family: "Gotham", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

@media (max-width: 768px) {
  body {
    padding-top: var(--navbar-height-mobile);
  }
}

/* ------------------------- */
/* --- Content Structure --- */
/* ------------------------- */

.content-wrapper {
  min-height: calc(100vh - var(--navbar-height));
  background-color: #f1f7fb;
}

@media (max-width: 768px) {
  .content-wrapper {
    min-height: calc(100vh - var(--navbar-height-mobile));
  }
}

/* ---------------- */
/* --- Navbar --- */
/* ---------------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: white;
  border-bottom: 1px solid var(--rda-border);
  z-index: 1000;
  transition: height var(--transition-speed) ease;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--rda-blue);
  transition: opacity var(--transition-speed) ease;
}

.navbar-logo:hover {
  opacity: 0.8;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
  color: var(--rda-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed) ease;
  position: relative;
}

.nav-link:hover {
  color: var(--rda-blue);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--rda-blue);
  transform: scaleX(0);
  transition: transform var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ----------------- */
/* --- Dropdowns --- */
/* ----------------- */

.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid var(--rda-border);
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.dropdown-toggle:hover {
  background-color: var(--rda-light-gray);
  border-color: var(--rda-gray);
}

.dropdown-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform var(--transition-speed) ease;
}

.dropdown-toggle.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background-color: white;
  border: 1px solid var(--rda-border);
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-speed) ease;
  z-index: 1001;
  overflow: hidden;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--rda-dark);
  text-decoration: none;
  font-weight: 400;
  transition: background-color var(--transition-speed) ease;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--rda-light-gray);
  color: var(--rda-blue);
}

.dropdown-item.active {
  background-color: rgba(0, 102, 204, 0.1);
  color: var(--rda-blue);
}

.dropdown-divider {
  height: 1px;
  margin: 0.25rem 0;
  background-color: var(--rda-border);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rda-blue) 0%, #003e73 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* ----------------- */
/* --- Accordion --- */
/* ----------------- */

.accordion-header {
  cursor: pointer;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.accordion-icon.rotate-180 {
  transform: rotate(180deg);
}

/* ---------------------------------- */
/* --- Modern Toast Notifications --- */
/* ---------------------------------- */

.toast-container {
  position: fixed;
  top: calc(var(--navbar-height) + 1rem);
  right: 1rem;
  z-index: 9999;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 2rem);
}

@media (max-width: 768px) {
  .toast-container {
    top: calc(var(--navbar-height-mobile) + 1rem);
    max-width: calc(100vw - 2rem);
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  margin-bottom: 1rem;
  pointer-events: all;
  transform: translateX(calc(100% + 2rem));
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast-success::before {
  background: linear-gradient(180deg, #1ea8e0 0%, #0057a3 100%);
}

.toast-error::before {
  background: linear-gradient(180deg, #b15d5d 0%, #7e3e3e 100%);
}

.toast-warning::before {
  background: linear-gradient(180deg, #d5e9ff 0%, #0057a3 100%);
}

.toast-info::before {
  background: linear-gradient(180deg, #1ea8e0 0%, #003e73 100%);
}

.toast-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon {
  background: linear-gradient(
    135deg,
    rgba(30, 168, 224, 0.12) 0%,
    rgba(0, 87, 163, 0.12) 100%
  );
  color: #1ea8e0;
}

.toast-error .toast-icon {
  background: linear-gradient(
    135deg,
    rgba(177, 93, 93, 0.12) 0%,
    rgba(126, 62, 62, 0.12) 100%
  );
  color: #b15d5d;
}

.toast-warning .toast-icon {
  background: linear-gradient(
    135deg,
    rgba(213, 233, 255, 0.12) 0%,
    rgba(0, 87, 163, 0.12) 100%
  );
  color: #0057a3;
}

.toast-info .toast-icon {
  background: linear-gradient(
    135deg,
    rgba(30, 168, 224, 0.12) 0%,
    rgba(0, 62, 115, 0.12) 100%
  );
  color: #1ea8e0;
}

.toast-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.toast-content {
  flex: 1;
  padding-right: 0.5rem;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--rda-dark);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--rda-gray);
  line-height: 1.5;
}

.toast-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: transparent;
  border: none;
  color: var(--rda-gray);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  padding: 0;
}

.toast-close:hover {
  background-color: var(--rda-light-gray);
  color: var(--rda-dark);
}

.toast-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rda-blue) 0%, var(--rda-green) 100%);
  animation: progress 5s linear forwards;
  transform-origin: left;
}

@keyframes progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.toast.dismissing {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  to {
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
  }
}

/* ------------------ */
/* --- Responsive --- */
/* ------------------ */

/* ------------------- */
/* --- Accessibility --- */
/* ------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------- */
/* --- Smooth Scrolling --- */
/* --------------------- */

html {
  scroll-behavior: smooth;
}

/* ------------------------ */
/* --- Loading Spinner --- */
/* ------------------------ */

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--rda-light-gray);
  border-radius: 50%;
  border-top-color: var(--rda-blue);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------- */
/* --- Card Styles --- */
/* --------------------- */

.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition-speed) ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ----------------------- */
/* --- Badge Styles --- */
/* ----------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-blue {
  background-color: rgba(30, 168, 224, 0.14);
  color: #0057a3;
}

.badge-green {
  background-color: rgba(0, 87, 163, 0.12);
  color: #1ea8e0;
}

.badge-yellow {
  background-color: rgba(213, 233, 255, 0.14);
  color: #0057a3;
}

.badge-red {
  background-color: rgba(177, 93, 93, 0.14);
  color: #b15d5d;
}

.badge-gray {
  background-color: var(--rda-light-gray);
  color: var(--rda-gray);
}
