/* ==========================================================================
   JusTax.in Design System Stylesheet
   Theme: Clean Light SaaS UI (#0fadd0 primary, #046073 deep teal, #f8fafc bg)
   ========================================================================== */

:root {
  /* Brand Colors */
  --primary: #0fadd0;
  --primary-hover: #0d9bbc;
  --primary-dark: #046073;
  --primary-light: #e8f7fa;
  --primary-border: #b8e6ef;
  --gradient-brand: linear-gradient(135deg, #0fadd0 0%, #046073 100%);
  --gradient-brand-soft: linear-gradient(135deg, #3ab9d3 0%, #0a8ba9 100%);

  /* Neutrals & Surfaces */
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --card-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #0fadd0;

  /* Typography */
  --text: #0f172a;
  --text-body: #334155;
  --dim: #64748b;
  --placeholder: #94a3b8;

  /* Functional Status */
  --green: #10b981;
  --green-bg: #dcfce7;
  --green-text: #15803d;
  --green-border: #bbf7d0;

  --red: #ef4444;
  --red-bg: #fee2e2;
  --red-text: #b91c1c;
  --red-border: #fecaca;

  --amber: #f59e0b;
  --amber-bg: #fef3c7;
  --amber-text: #b45309;
  --amber-border: #fde68a;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 4px 20px 0 rgba(15, 173, 208, 0.3);
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-body);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* JusTax Signature Header */
.brand-header {
  background: var(--gradient-brand);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(15, 173, 208, 0.25);
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.brand-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.brand-badge {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
}

/* Cards & Surfaces */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 0.88rem;
  line-height: 1.25;
}

.btn-primary, .btn-blue {
  background: #0fadd0;
  color: #ffffff;
  border-color: #0fadd0;
  box-shadow: 0 2px 8px rgba(15, 173, 208, 0.3);
}
.btn-primary:hover, .btn-blue:hover {
  background: #0d9bbc;
  border-color: #0d9bbc;
}

.btn-green {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}
.btn-green:hover {
  background: #15803d;
}

.btn-amber {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.btn-amber:hover {
  background: #d97706;
}

.btn-red, .btn-danger {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-red:hover, .btn-danger:hover {
  background: #dc2626;
}

.btn-light {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}
.btn-light:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Data Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #fafcff;
}

tbody tr:hover {
  background: #f0f9ff;
}

/* Form Controls & Inputs */
.form-ctrl {
  width: 100%;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-ctrl:focus {
  border-color: #0fadd0;
  box-shadow: 0 0 0 3px rgba(15, 173, 208, 0.18);
}

.form-ctrl::placeholder {
  color: #94a3b8;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-green {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}

.badge-red {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid var(--red-border);
}

.badge-amber {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.badge-primary, .badge-cyan {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0fadd0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 14px 18px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideInRight 0.25s ease-out forwards;
  font-size: 0.88rem;
  color: #0f172a;
}

.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Spinner Animation */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .brand-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hide-mobile {
    display: none !important;
  }
}
