/* Variables */
:root {
  --primary-color: #c80000;
  --secondary-color: #2c2e43;
  --success-color: #4bb543;
  --warning-color: #f9c74f;
  --danger-color: #ef476f;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

/* Base Styles */
.planning-container {
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 2rem; */
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--dark-color);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark-color);
}

h1 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
  margin: 0;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

p {
  margin: 0 0 1rem;
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
  text-align: center;
  padding: 1.5rem;
  background: #2c2e43;
  border-radius: var(--border-radius);
}

.page-header h1 {
  margin: 0;
  color: white;
  justify-content: center;
  font-size: 23px;
}

.page-header .subtitle {
  color: white;
  font-size: 12px;
  margin: 0.5rem 0 0;
}
/* Cards */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid #e9ecef;
}

.card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.card-header h3 {
  font-size: 20px;
}

.card-body {
  padding: 1.5rem;
}

/* Info Card */
.info-card .card-body {
  padding: 1.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  transition: var(--transition);
}

.info-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.info-item i {
  font-size: 1.5rem;
  color: var(--secondary-color);
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(67, 97, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-color);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-weight: 500;
  color: var(--dark-color);
  font-size: 1rem;
}

/* Planning Controls */
.planning-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.prevMonth {
  color: var(--light-color);
}
.nextMonth {
  color: var(--light-color);
}

.month-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.month-navigation h2 {
  margin: 0;
  font-size: 12px;
  min-width: 180px;
  text-align: center;
}

.view-options {
  display: flex;
  gap: 0.5rem;
}

/* Calendar Grid */
.calendar-grid {
  width: 100%;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--light-color);
  border-bottom: 1px solid var(--light-gray);
}

.weekday {
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--gray-color);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.calendar-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 35px;
}
.calendar-navigation {
  width: 50%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.calendar-navigation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  /* background: linear-gradient(to bottom, #4e73df, #224abe); */
}

.calendar-navigation h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  text-transform: none;
  letter-spacing: 0.3px;
  flex-grow: 1;
  text-align: center;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.btn-icon {
  background: white;
  border: 1px solid #e0e0e0;
  color: #4e73df;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.6rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.btn-icon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(78, 115, 223, 0.1) 0%,
    rgba(34, 74, 190, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-icon:hover {
  background: white;
  color: #224abe;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(200, 0, 0, 0.2);
}

.calendar-navigation .btn-icon:active {
  transform: translateY(0);
}

.calendar-navigation .btn-icon i {
  font-size: 1rem;
}

.calendar-navigation .btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cccccc;
  box-shadow: none;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(120px, auto);
  background: #fff;
}

.day {
  border: 1px solid var(--light-gray);
  padding: 0.75rem;
  min-height: 120px;
  transition: var(--transition);
  background: white;
  position: relative;
}

.day:hover {
  background: #f8f9ff;
  z-index: 2;
  box-shadow: 0 0 0 1px var(--primary-color);
}

.day.today {
  background: #f0f8ff;
  border-left: 3px solid var(--primary-color);
}

.day.other-month {
  background: #fafafa;
  color: #aaa;
}

.day-number {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  text-align: center;
  line-height: 1;
  border-radius: 50%;
  transition: var(--transition);
  font-size: 0.9rem;
}

.day:hover .day-number {
  background: var(--primary-color);
  color: white;
}

.today .day-number {
  background: var(--primary-color);
  color: white;
  font-weight: 700;
}

.day-events {
  margin-top: 0.5rem;
}

.calendar-event {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin: 0.15rem 0;
  border-radius: 4px;
  background: #f0f4ff;
  border-left: 3px solid #4361ee;
  cursor: pointer;
  transition: var(--transition);
}

.calendar-event:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-event.maintenance {
  border-left-color: #4cc9f0;
  background: #f0f9ff;
}

.calendar-event.repair {
  border-left-color: #f72585;
  background: #fff0f6;
}

.calendar-event.inspection {
  border-left-color: #4cc9f0;
  background: #f0f9ff;
}

.calendar-event.emergency {
  border-left-color: #ff3d00;
  background: #fff0f0;
}

.event-time {
  font-size: 0.7rem;
  color: #666;
  font-weight: 500;
}

.event-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Event Items */
.event-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid var(--light-gray);
  transition: var(--transition);
}

.event-item:hover {
  background: #f8f9ff;
}

.event-date {
  background: var(--secondary-color);
  color: white;
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
  min-width: 50px;
  margin-right: 1rem;
}

.event-day {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.event-month {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.9;
}

.event-details {
  flex: 1;
}

.event-time {
  font-size: 0.85rem;
  color: var(--gray-color);
  margin-bottom: 0.25rem;
}

.event-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.event-location {
  font-size: 0.85rem;
  color: var(--gray-color);
}

.event-actions {
  display: flex;
  gap: 0.5rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}



.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--light-gray);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin: 0 -0.5rem;
}

.form-row .form-group {
  flex: 1;
  margin: 0 0.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-color);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

select.form-control {
  height: 38px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .planning-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-options {
    width: 100%;
    justify-content: flex-start;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .form-row .form-group {
    margin: 0;
  }

  .event-item {
    flex-direction: column;
  }

  .event-actions {
    margin-top: 1rem;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Buttons (from previous CSS) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.5;
}

.btn i {
  font-size: 0.9em;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color);
}

.card {
  /* margin-top: 60px !important; */
  margin-bottom: 10px !important;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.card-header i {
  padding-right: 20px;
}
.card-header h3 {
  font-size: 16px;
}
.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}
.btn-outline {
  background: transparent !important;
  color: var(--gray-color) !important;
  border: 1px solid #dee2e6 !important;
}

.btn-outline:hover {
  background-color: #f8f9fa;
  border-color: #ced4da;
  color: var(--dark-color);
  transform: translateY(-2px);
}

.btn-outline.active {
  background: var(--secondary-color) !important;
  color: white;
  border-color: var(--secondary-color);
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #e9ecef;
  color: white !important;
  background-color: var(--primary-color) !important;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
  transform: translateY(-2px);
}
