
/* Main Styles */
:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --primary: #3b82f6;
  --danger: #ea0606;
  --success: #10b981;
  --warning: #664d03;
  --primary-hover: #2563eb;
  --secondary: #f1f5f9;
  --border: #e2e8f0;
  --muted: #94a3b8;
  --radius: 0.5rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

.loader-overlay {
  position: fixed !important;

  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;

  width: 100vw !important;
  height: 100vh !important;

  background-color: rgba(0, 0, 0, 0.70);

  z-index: 99999 !important;
}
.loader-overlay p {
  position: absolute !important;

  top: calc(50% + 185px) !important;
  left: 0 !important;

  width: 100% !important;

  margin: 0 !important;

  color: white !important;

  text-align: center !important;

  font-size: 16px !important;
  font-weight: 600 !important;

  z-index: 100001 !important;
}

.talkkosher-loader {
  position: absolute !important;

  top: 50% !important;
  left: 50% !important;

  transform: translate(-50%, -50%) !important;

  width: 320px !important;
  height: 320px !important;

  min-width: 320px !important;
  min-height: 320px !important;

  max-width: 320px !important;
  max-height: 320px !important;

  border-radius: 50% !important;

  background: #ffffff !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  overflow: hidden !important;

  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.4);

  z-index: 100000 !important;
}

.talkkosher-loader-logo {
  position: relative !important;
  z-index: 3 !important;

  display: block !important;

  width: 220px !important;
  max-width: 220px !important;

  height: auto !important;
  max-height: 190px !important;

  object-fit: contain !important;

  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;

  border-radius: 0 !important;
}

.talkkosher-spinner {
  position: absolute !important;

  top: 18px !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 18px !important;

  width: auto !important;
  height: auto !important;

  border-radius: 50% !important;

  border: 7px solid rgba(73, 183, 223, 0.18) !important;

  border-top-color: #49b7df !important;
  border-right-color: #2d499e !important;
  border-bottom-color: #49b7df !important;

  z-index: 2 !important;

  animation: talkkosher-spin 1.1s linear infinite !important;
}

.talkkosher-spinner::after {
  content: "";

  position: absolute;

  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;

  border-radius: 50%;

  border: 3px solid transparent;

  border-left-color: #2d499e;
  border-bottom-color: #49b7df;

  animation: talkkosher-spin-reverse 1.7s linear infinite;
}

@keyframes talkkosher-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes talkkosher-spin-reverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

.d-inline{
  display: inline !important;
}

.w-inherit{
  width: inherit !important;
}

.underline{
  text-decoration: underline !important;
}

.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 2.2rem;
}

.text-3xl {
  font-size: 1.875rem;
}
.text-4xl {
  font-size: 3rem;
}

.text-muted {
  color: var(--muted);
}

.text-primary {
  color: var(--primary);
}
.text-danger {
  color: var(--danger);
}
.text-success {
  color: var(--success);
}
.text-warning {
  color: var(--warning);
}
.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mr-4 {
  margin-right: 1rem;
}

.w-full {
  width: 100%;
}

.h-screen {
  height: 100vh;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

.p-0{
  padding: 0 !important;
}
.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.border-0{
  border: none !important;
}
.border {
  border: 1px solid var(--border);
}

.border-b {
  border-bottom: 1px solid var(--border);
}

.rounded {
  border-radius: var(--radius);
}

.rounded-full {
  border-radius: 9999px;
}

.bg-white {
  background-color: white;
}

.bg-primary {
  background-color: var(--primary);
}

.bg-secondary {
  background-color: var(--secondary);
}

.text-white {
  color: white;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hidden {
  display: none;
}

/* Form Controls */
input, select, textarea, button {
  font-family: inherit;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--background);
  background-clip: padding-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-primary {
  color: white;
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline {
  color: var(--foreground);
  background-color: transparent;
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: var(--secondary);
}

.btn-success {
  color: white;
  background-color: var(--success);
  border-color: var(--success);
}
.btn-success:hover {
  background-color: #0f766e;
  border-color: #0f766e;
}

.btn-outline-success {
  color: var(--success);
  background-color: transparent;
  border-color: var(--success);
}
.btn-outline-success:hover {
  background-color: rgba(16, 185, 129, 0.1);
}

.btn-danger {
  color: white;
  background-color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover {
  background-color: #991b1b;
  border-color: #991b1b;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Card */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: white;
  background-clip: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-header {
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 0;
  border-bottom: none;
}

.card-title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.card-subtitle {
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.card-body {
  flex: 1 1 auto;
  padding: 1.5rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
  background-color: transparent;
  border-top: none;
}

/* Table */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--foreground);
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid var(--border);
  text-align: left;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.table tbody + tbody {
  border-top: 2px solid var(--border);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.075);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 9999px;
}

.badge-success {
  color: var(--success);
  background-color: #d1e7dd;
}

.badge-warning {
  color: var(--warning);
  background-color: #fff3cd;
}

.badge-danger {
  color: var(--danger);
  background-color: #f8d7da;
}

.badge-info {
  color: #055160;
  background-color: #cff4fc;
}

.badge-secondary {
  color: #41464b;
  background-color: #e2e3e5;
}

.alert{
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1.5;
}

.alert-danger {
  color: var(--danger);
  background-color: #f8d7da;
}


/* Sidebar */
.sidebar {
  width: 16rem;
  height: 100vh;
  border-right: 1px solid var(--border);
  background-color: white;
  overflow-y: auto;
  transition: width 0.3s ease;
}

.sidebar-collapsed {
  width: 4rem;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--foreground);
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}

.sidebar-menu {
  padding: 0.5rem;
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--foreground);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color 0.2s;
  margin-bottom: 0.25rem;
}

.sidebar-link:hover {
  background-color: var(--secondary);
}

.sidebar-link.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.sidebar-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
}

/* Layout */
.layout {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.layout-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Dashboard specific */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.stat-title {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Chart container */
.chart-container {
  width: 100%;
  height: 300px;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
  
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .sm\:block {
    display: block;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .md\:table-cell {
    display: table-cell;
  }
  
  .md\:flex {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* =========================================
   RESPONSIVE GLOBAL LAYOUT
   ========================================= */


/* Desktop */
@media (min-width: 1200px) {

  .sidebar {
    width: 16rem;
    min-width: 16rem;
    flex: 0 0 16rem;
  }

  .layout-content {
    min-width: 0;
  }
}


/* Laptop / large tablet / small desktop */
@media (min-width: 768px) and (max-width: 1199px) {

  .sidebar {
    width: 4rem !important;
    min-width: 4rem !important;
    flex: 0 0 4rem !important;
  }

  .sidebar .sidebar-label,
  .sidebar .sidebar-brand-text {
    display: none !important;
  }

  .sidebar-header,
  .sidebar-link {
    justify-content: center;
  }

  .sidebar-icon {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .sidebar.sidebar-open {
    width: 16rem !important;
    min-width: 16rem !important;
    flex: 0 0 16rem !important;
  }

  .sidebar.sidebar-open .sidebar-label,
  .sidebar.sidebar-open .sidebar-brand-text {
    display: block !important;
  }

  .sidebar.sidebar-open .sidebar-header,
  .sidebar.sidebar-open .sidebar-link {
    justify-content: initial;
  }

  .layout-content {
    min-width: 0;
    padding: 1rem;
  }

  .container {
    width: 100%;
    max-width: 100%;
  }

  .row > * {
    min-width: 0;
  }

  .card {
    min-width: 0;
    max-width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* Small tablet / mobile */
@media (max-width: 767px) {

  .layout {
    width: 100%;
  }

  .sidebar {
    width: 4rem !important;
    min-width: 4rem !important;
    flex: 0 0 4rem !important;
  }

  .sidebar .sidebar-label,
  .sidebar .sidebar-brand-text {
    display: none !important;
  }

  .sidebar-header,
  .sidebar-link {
    justify-content: center;
  }

  .sidebar-icon {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

.sidebar.sidebar-open {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;

  width: min(16rem, 85vw) !important;
  min-width: min(16rem, 85vw) !important;
  flex: none !important;

  height: 100vh;
  z-index: 9999;

  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
}

  .sidebar.sidebar-open .sidebar-label,
  .sidebar.sidebar-open .sidebar-brand-text {
    display: block !important;
  }

  .sidebar.sidebar-open .sidebar-header,
  .sidebar.sidebar-open .sidebar-link {
    justify-content: initial;
  }

 .layout-content {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0.75rem;
  overflow-x: hidden;
}

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .row {
    margin-left: 0;
    margin-right: 0;
  }

  .row > [class*="col-"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .card,
  .row > *,
  .layout-content > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .stats-grid,
  .grid-cols-2,
  .grid-cols-3,
  .sm\:grid-cols-2,
  .md\:grid-cols-2,
  .md\:grid-cols-3,
  .md\:grid-cols-4,
  .lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  input,
  select,
  textarea {
    max-width: 100%;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }
}


/* Very small phones */
@media (max-width: 575px) {

  .layout-content {
    padding: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .card-header {
    padding: 1rem 1rem 0;
  }

  .text-4xl {
    font-size: 2rem;
  }

  .text-3xl {
    font-size: 1.5rem;
  }

  .btn {
    max-width: 100%;
    white-space: normal;
  }
}
