/* =====================================================
   SURGERY REPORT
   ===================================================== */

#surgery_report {
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: #333;
  padding: 16px;
  background: #f5f5f5;
}

#create_block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Order bar --- */
.info-order-block {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#order_left  { flex: 1; }
#order_center { display: flex; justify-content: center; }
#order_right  { display: flex; gap: 8px; justify-content: flex-end; }

/* --- Selectors --- */
.info-selector {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  height: 36px;
}

.info-selector:focus {
  outline: none;
  border-color: #1e88e5;
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.info-selector:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
}

/* --- Tab cabinet (mirrors .tab_cabinet pattern) --- */
.info-tabs {
  display: flex;
  gap: 4px;
  padding-left: 12px;
}

.info-tab {
  padding: 8px 24px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: #b0bec5;
  color: #37474f;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  top: 1px;
  transition: background 0.2s;
  font-family: Arial, sans-serif;
}

.info-tab:hover { background: #90a4ae; }

.info-tab.active {
  background: white;
  color: #1976d2;
  border: 1px solid #e0e0e0;
  border-bottom: 1px solid white;
  z-index: 1;
}

/* --- Folder panel (mirrors .tab_content) --- */
.folder {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.info-content { padding: 16px; }

.info-panel { display: none; }
.info-panel.active { display: block; }

/* --- Form layout --- */
.info-form h2 {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.info-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin-bottom: 12px;
  align-items: start;
}

.info-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-row label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-form input[type="text"],
.info-form input[type="date"],
.info-form input[type="time"] {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  height: 34px;
}

.info-form input:focus,
.info-form textarea:focus {
  outline: none;
  border-color: #1e88e5;
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.info-form input:disabled,
.info-form textarea:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
}

.info-form textarea {
  font-family: Arial, sans-serif;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  padding: 6px 8px;
  resize: vertical;
}

/* --- Orange action buttons (matches .upload_btn) --- */
.info-button {
  background-color: #f29900;
  color: #fff;
  font-weight: 600;
  font-family: Arial, sans-serif;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  height: 34px;
  font-size: 13px;
  padding: 0 12px;
  transition: background-color 0.15s ease;
}

.info-button:hover:not(:disabled) { background-color: #e68900; }

.info-button:disabled {
  background-color: #797878 !important;
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Material table (mirrors global table styles) --- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-table th {
  background-color: #f29900;
  color: white;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  border: 1px solid #ccc;
  line-height: 1.2;
  position: sticky;
  top: 0;
  z-index: 2;
}

.info-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  vertical-align: middle;
  font-size: 13px;
}

.info-table tbody tr:hover { background: #fff8e1; }

/* --- Add row button --- */
.info-add-row-container {
  display: flex;
  padding: 10px 0 2px;
}

.info-add-row-button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f29900;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.info-add-row-button:hover:not(:disabled) { background-color: #e68900; }

.info-add-row-button:disabled {
  background-color: #797878 !important;
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Responsive --- */
@media (max-width: 1366px) {
  .info-table, .info-table td, .info-table th { font-size: 11px; }
}

@media (max-width: 600px) {
  .info-row { grid-template-columns: 1fr; }
}

/* =====================================================
   DATE ASSIGN CONTAINER
   ===================================================== */

#date_assign {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 12px;
  box-sizing: border-box;
}

/* =====================================================
   TOP ROW: select + labels
   ===================================================== */

#calendar_select_row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

#calendar_select {
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
  background-color: white;
}

#calendar_order,
#calendar_name,
#calendar_esti_date {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* =====================================================
   CALENDAR
   ===================================================== */

#calendar {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 12px;
}

#calendar_header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #f29900;
  color: white;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

#calendar_header span {
  padding: 8px 0;
  text-align: center;
}

#calendar_grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: white;
}

/* Individual day cells - add via JS */
.calendar_day {
  padding: 10px 4px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #f0f0f0;
  transition: background-color 0.15s ease;
}

.calendar_day:hover {
  background-color: #e3f2fd;
}

.calendar_day.selected {
  background-color: #1e88e5;
  color: white;
  font-weight: 700;
}

.calendar_day.today {
  border: 2px solid #f29900;
  font-weight: 700;
}

.calendar_day.disabled {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

.calendar_day.empty {
  background-color: #fafafa;
  cursor: default;
  pointer-events: none;
}

/* =====================================================
   BUTTONS ROW
   ===================================================== */

#calendar_buttons_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.cal_btn_group {
  display: flex;
  gap: 10px;
}

#cal_accept {
  background-color: #2e7d32;
}

#cal_accept:hover {
  background-color: #1b5e20;
}

#cal_reject {
  background-color: #b00020;
}

#cal_reject:hover {
  background-color: #7f0015;
}

/* cal_clear inherits default blue button style */

@media (max-width: 1366px) {
  #calendar_header span,
  .calendar_day {
    font-size: 11px;
    padding: 6px 2px;
  }
}