@import url("../vendor/fonts/inter/inter.css");

:root {
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --success-green: #16a34a;
  --warning-orange: #ea580c;
  --error-red: #dc2626;
  --info-blue: #0ea5e9;
  --premium-purple: #9333ea;

  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --bg-light: #f3f4f6;
  --bg-white: #ffffff;

  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

body {
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-dark);
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Premium Cards */
.card-premium {
  background: var(--bg-white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-premium:hover {
  box-shadow: var(--card-shadow-hover);
}

/* Custom Buttons */
.btn-brand {
  background-color: var(--primary-blue);
  color: white;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
}

.btn-brand:hover {
  background-color: var(--primary-blue-hover);
  color: white;
  transform: translateY(-1px);
}

.btn-brand:active {
  transform: translateY(0);
}

.text-brand {
    color: var(--primary-blue) !important;
}

/* Metric Cards */
.metric-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.metric-card .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.metric-card .value {
  font-size: 1.75rem;
  font-weight: 700;
}

.metric-card .change {
  font-size: 0.875rem;
  font-weight: 500;
}

.metric-card .change.up {
  color: var(--success-green);
}
.metric-card .change.down {
  color: var(--error-red);
}

/* Status Badges */
.badge-status {
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-unverified {
  background-color: #fff7ed;
  color: var(--warning-orange);
  border: 1px solid #ffedd5;
}

.badge-verified {
  background-color: #f0fdf4;
  color: var(--success-green);
  border: 1px solid #dcfce7;
}

/* Growth Badges */
.badge-growth {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.badge-growth.positive {
    background-color: #f0fdf4;
    color: var(--success-green);
}

.badge-growth.negative {
    background-color: #fef2f2;
    color: var(--error-red);
}

/* Excel-like Tables */
.table-excel {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.85rem;
}

.table-excel thead th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  text-align: left;
}

.table-excel tbody td {
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  color: #1e293b;
}

.table-excel tbody tr:hover {
  background-color: #f1f5f9;
}

/* Main Layout */
.main-wrapper {
  width: 100%;
  padding: 1.5rem;
  max-width: 100%;
}

/* Navbar Modern Style (Restored) */
.navbar-modern {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.4rem 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
  transition: all 0.3s ease;
  border-radius: 9999px;
  margin: 1rem 1.5rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-modern .navbar-brand {
    font-weight: 700;
    color: var(--primary-blue) !important;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.navbar-modern .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.35rem 0.75rem !important;
    border-radius: 9999px;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.navbar-modern .nav-link:hover {
    color: var(--primary-blue) !important;
    background-color: #eff6ff;
}

.navbar-modern .nav-link.active {
    color: var(--primary-blue) !important;
    background-color: #eff6ff;
    font-weight: 600;
}

/* Dropdown on Hover */
.navbar-modern .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0; /* Remove gap that could cause flicker */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-modern .dropdown-menu {
    transition: all 0.2s ease-in-out;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.navbar-modern .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Navbar Legacy Style (Deprioritized) */
.navbar-legacy {
  background-color: #1e293b; 
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar-legacy .navbar-brand {
  color: white !important;
  font-weight: 600;
  font-size: 1.1rem;
  margin-right: 2rem;
  text-decoration: none;
}

.navbar-legacy .nav-link {
  color: #cbd5e1 !important; /* light gray */
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: 4px;
  margin-right: 0.25rem;
  text-decoration: none;
  transition: all 0.15s;
}

.navbar-legacy .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white !important;
}

.navbar-legacy .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: white !important;
  font-weight: 600;
}

/* User Profile in Nav */
.user-profile-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: #f9fafb;
  border: 1px solid #f3f4f6;
  font-size: 0.8rem;
}

/* Search Bar in Detail */
.search-container-modern {
  position: relative;
  max-width: 400px;
}

.search-container-modern input {
  padding-left: 2.5rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
}

.search-container-modern i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast-premium {
  min-width: 300px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInRight 0.3s ease-out forwards;
  border-left: 4px solid var(--primary-blue);
}

.toast-premium.success {
  background-color: #f0fdf4;
  border-left-color: var(--success-green);
  color: #166534;
}

.toast-premium.error {
  background-color: #fef2f2;
  border-left-color: var(--error-red);
  color: #991b1b;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Skeleton Loading Screens */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.x-small {
    font-size: 0.65rem;
    padding: 2px 8px;
}

/* Reconciliation Styles */
.summary-box-premium {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.summary-item-card {
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 12px;
    height: 100%;
}

.summary-item-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.025em;
    margin-bottom: 4px;
}

.summary-item-card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.summary-item-card.highlight {
    border-left: 4px solid var(--primary-blue);
}
