/* 
   Senior UI Design System - Standardized 
   Theme: Shart, Clean, professional (5px Border Radius, Inset Shadows)
*/

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

:root {
  --border-radius: 5px;
  --custom-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgb(229, 231, 235) 0px 0px 0px 1px inset;
  --input-shadow: rgba(0, 0, 0, 0.02) 0px 1px 2px, rgb(209, 213, 219) 0px 0px 0px 1px inset;
  --primary: #2563eb;
  --bg-light: #f9fafb;
  --card-bg: #ffffff;
}

/* Base Polish */
* {
  border-radius: inherit;
  box-sizing: border-box;
}

body {
  font-family: 'Public Sans', 'Inter', sans-serif !important;
  background-color: var(--bg-light);
  color: #111827;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Force 5px Radius on EVERYTHING */
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.rounded-full,
[class*="rounded-"],
input,
select,
textarea,
button,
form,
table,
section,
header,
div[class*="rounded-"] {
  border-radius: var(--border-radius) !important;
}

/* Global Shadow Override */
header,
button,
.bg-white,
.dark .bg-slate-800,
.custom-card,
[class*="shadow-"],
.tab-btn {
  box-shadow: var(--custom-shadow) !important;
  border: none !important;
}

/* Form Interiors - No Shadows requested */
form,
form input,
form select,
form textarea,
form div {
  box-shadow: none !important;
}

/* Re-apply shadow to buttons inside forms for visibility */
form button {
  box-shadow: var(--custom-shadow) !important;
}

/* Input Field Polish */
input,
select,
textarea {
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  background-color: #ffffff !important;
  box-shadow: var(--input-shadow) !important;
  transition: box-shadow 0.2s;
}

/* Radio Button Reset - Fixing "Broken" UI */
input[type="radio"],
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem !important;
  height: 1.25rem !important;
  border-radius: 50% !important;
  /* Forces circular radio */
  border: 1px solid #d1d5db !important;
  background-color: #fff !important;
  box-shadow: none !important;
  display: grid;
  place-content: center;
  cursor: pointer;
}

input[type="radio"]::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--primary);
  background-color: CanvasText;
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

/* Dark Mode Polish */
.dark body {
  background-color: #0f172a;
  color: #f1f5f9;
}

.dark :is(header, main > div, section, form, .bg-white, .bg-slate-800, table, .custom-card, input, select) {
  box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px, rgb(51, 65, 85) 0px 0px 0px 1px inset !important;
  background-color: #1e293b !important;
  color: #f8fafc;
}

/* Tab System Fix - Ensure active tab has clean bottom line */
.tab-btn.active {
  background-color: #ffffff !important;
  color: var(--primary) !important;
  box-shadow: var(--custom-shadow), 0 -2px 0 0 var(--primary) inset !important;
}

.dark .tab-btn.active {
  background-color: #1e293b !important;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px, rgb(51, 65, 85) 0px 0px 0px 1px inset, 0 -2px 0 0 #60a5fa inset !important;
}