/* 
   Capp – Modern Clean SaaS Design Style File
   Primary Theme Color: #23a5eb
*/

:root {
  /* Brand Colors */
  --bs-primary: #23a5eb;
  --bs-primary-rgb: 35, 165, 235;
  --bs-primary-bg-subtle: #e9f6fd;
  --bs-primary-border-subtle: #bae2f9;
  --bs-primary-text-emphasis: #125582;
  
  --bs-link-color: #23a5eb;
  --bs-link-hover-color: #1288c8;

  /* Typography & Layout */
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bs-body-bg: #f8fafc; /* Soft slate white */
  --bs-body-color: #1e293b; /* Premium dark slate */
  --bs-border-color: #e2e8f0; /* Soft border slate-200 */
  
  /* Radii & Shadows */
  --custom-radius: 10px;
  --custom-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --custom-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
body {
  padding-bottom: 3rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modernized Typography */
h1, h2, h3, h4, h5, h6 {
  color: #0f172a;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Custom Navigation Bar */
.navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.navbar-brand {
  font-weight: 700;
  color: var(--bs-primary) !important;
  letter-spacing: -0.03em;
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .navbar-nav .nav-link {
  color: #64748b !important; /* Slate 500 */
  font-weight: 500;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar .navbar-nav .nav-link:hover {
  color: var(--bs-primary) !important;
  background-color: var(--bs-primary-bg-subtle);
}

.navbar .navbar-nav .nav-link.active {
  color: var(--bs-primary) !important;
  font-weight: 600;
}

.navbar .navbar-nav .logout-link {
  color: #ef4444 !important; /* Red 500 */
  font-weight: 500;
}

.navbar .navbar-nav .logout-link:hover {
  background-color: #fef2f2 !important; /* Red 50 */
  color: #dc2626 !important;
}

.navbar-toggler {
  border-color: #e2e8f0 !important;
  background-color: #f8fafc;
}

.navbar-toggler-icon {
  filter: invert(48%) sepia(80%) saturate(1917%) hue-rotate(180deg) brightness(97%) contrast(93%);
}

/* Segmented Controls for nav-pills */
.nav-pills {
  background-color: #f1f5f9; /* Slate 100 */
  padding: 4px;
  border-radius: 8px;
  display: inline-flex;
  gap: 2px;
}

.nav-pills .nav-link {
  color: #64748b; /* Slate 500 */
  font-weight: 500;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  border: none;
}

.nav-pills .nav-link:hover {
  color: #0f172a;
}

.nav-pills .nav-link.active, 
.nav-pills .show > .nav-link {
  background-color: #ffffff;
  color: var(--bs-primary);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

/* Beautiful Cards */
.card {
  background: #ffffff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--custom-radius);
  box-shadow: var(--custom-shadow);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: var(--custom-shadow-lg);
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
  padding: 1.1rem 1.25rem;
  color: #0f172a;
}

.card-body {
  padding: 1.25rem;
}

/* Interactive Buttons */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #1c8ecb !important;
  border-color: #1c8ecb !important;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) !important;
}

.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #ffffff;
}

.btn-outline-secondary {
  color: #64748b;
  border-color: #cbd5e1;
}

.btn-outline-secondary:hover {
  background-color: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* Forms & Inputs */
.form-control, .form-select {
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(35, 165, 235, 0.12);
}

.form-label {
  font-weight: 500;
  color: #475569; /* Slate 600 */
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* Responsive Container Spacing */
.container-fluid {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- Calendar-Specific Redesign --- */

/* Tables and grids */
.table {
  border-color: var(--bs-border-color);
  --bs-table-bg: transparent;
}

.calendar-month-table,
.calendar-week-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--custom-radius);
  border: 1px solid var(--bs-border-color);
  background-color: #ffffff;
  box-shadow: var(--custom-shadow);
  overflow: hidden;
}

.calendar-month-table th,
.calendar-week-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.calendar-month-table th {
  text-align: center;
}

.calendar-month-table .calendar-day-cell {
  padding: 0.2rem !important;
  /*padding: 0.5rem 0.2rem 0.2rem 0.2rem !important;*/
}

/* Calendar Cells */
.calendar-day-cell {
  min-height: 120px !important; /* Adjusted slightly up for roominess */
  padding: 0.6rem !important;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid var(--bs-border-color);
  border-right: 1px solid var(--bs-border-color);
  cursor: pointer;
}

.calendar-day-cell:last-child {
  border-right: none;
}

.calendar-day-cell:hover {
  background-color: #f1f5f9; /* Slate 100 on hover */
}

.calendar-day-cell.bg-light {
  background-color: #f8fafc !important; /* Soft gray for out-of-month days */
}

.calendar-day-cell.bg-light .fw-bold {
  color: #94a3b8 !important; /* Muted Slate 400 for out-of-month dates */
}

/* Week View Cell Hover & Cursor */
.calendar-week-table td {
  transition: background-color 0.15s ease;
}

.calendar-week-table td:hover {
  background-color: #f1f5f9 !important;
}

/* Today's Special Highlight style - clean & modern */
.calendar-today {
  background-color: rgba(35, 165, 235, 0.05) !important;
  position: relative;
}

/* Today cell gets a top accent bar */
/*.calendar-today::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--bs-primary);
}*/

/* Today day number highlighted */
.calendar-today .fw-bold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bs-primary);
  color: #ffffff !important;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.85rem;
  margin-top: -2px;
}

/* Specific adjustments for Weekly View to avoid repeating horizontal blue lines in hourly cells */
.calendar-week-table td.calendar-today::before {
  display: none;
}

/* Today header cell in week view gets a bottom accent border to match the top bar */
.calendar-week-table th.calendar-today {
  border-bottom: 3px solid var(--bs-primary) !important;
}

.calendar-hour-cell {
  min-height: 45px !important;
  padding: 0.4rem !important;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid var(--bs-border-color);
  transition: background-color 0.1s ease;
}

.calendar-hour-cell:hover {
  background-color: #f8fafc;
}

/* Event Badge Styling */
.badge {
  white-space: normal;
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Compact Event Badge Styling for Month View */
.calendar-month-table .badge {
  white-space: nowrap !important;
  font-size: 0.55rem;
  padding: 0.15rem 0.08rem;
  margin-bottom: 0.15rem !important;
}

.badge:hover {
  filter: brightness(0.92);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
}

/* Preserving table layouts and widths */
.calendar-month-table td,
.calendar-month-table th,
.calendar-week-table td,
.calendar-week-table th {
  overflow: hidden;
}

/* touch-freundliche Bedienung, keine Notwendigkeit zum Zoomen (FA-5.2) */
.btn, .form-select, .form-control {
  min-height: 38px;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .calendar-day-cell {
    min-height: 80px !important;
    font-size: 0.85rem;
    padding: 0.4rem !important;
  }
  
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Schriftstärke für alle normalen Tagesnummern überschreiben (z.B. auf Medium = 500) */
.calendar-day-cell .fw-bold {
  font-weight: 400 !important;
}

/* Custom Week View (Row Layout) Styles */
.calendar-week-table .badge {
  white-space: nowrap !important;
  max-width: 250px;
  display: inline-block;
  vertical-align: middle;
}

.calendar-today-row {
  background-color: rgba(35, 165, 235, 0.02) !important;
}

.calendar-today-row td:first-child {
  border-left: 4px solid var(--bs-primary) !important;
}

/* Custom Week View (Row Layout) Styles */
.calendar-week-table .badge {
  white-space: nowrap !important;
  max-width: 250px;
  display: inline-block;
  vertical-align: middle;
  font-size: 0.6rem;   /* <-- DIESE ZEILE HINZUFÜGEN (Beispielwert: 0.72rem oder 0.7rem) */
}

/* Schriftgröße für Uhrzeiten / "ganztägig" in der Wochenansicht */
.calendar-week-table .text-muted.small {
  font-weight: 400;
  font-size: 0.7rem; /* <-- HIER: Standard-Bootstrap-Wert (0.875em) überschreiben, z.B. auf 0.75rem oder 0.7rem */
}