@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #0f172a;      /* Slate 900 */
  --primary-light: #3b82f6;      /* Blue 500 */
  --accent-color: #0ea5e9;       /* Light Blue 500 */
  --accent-2: #ef4444;           /* Red 500 (Emergency red) */
  --accent-gradient: linear-gradient(135deg, #2563eb, #0ea5e9);
  --base-text-color: #334155;    /* Slate 700 */
  --secondary-text-color: #64748b; /* Slate 500 */
  --base-background: #f1f5f9;    /* Slate 100 */
  --panel-background: #ffffff;
  --border-color: #e2e8f0;      /* Slate 200 */
  --border-radius: 12px;
  --transition-speed: 0.15s;
  --gradient-surface: linear-gradient(145deg, #ffffff, #f8fafc);
  --gradient-red-surface: linear-gradient(135deg, #fff7f7, #ffffff);
  
  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.1);
  --color-info: #3b82f6;
  --color-info-bg: rgba(59, 130, 246, 0.1);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 14px 30px rgba(15, 23, 42, 0.12);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--base-background);
  color: var(--base-text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container & Pages */
.container, .page {
  width: 100%;
  background: var(--panel-background);
  padding: 24px 20px 32px 20px;
  min-height: 100vh;
  margin: 0 auto;
}

@media (min-width: 640px) {
  body {
    padding: 40px 20px;
  }
  .container, .page {
    max-width: 100%;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 48px;
    min-height: auto;
    border: 1px solid var(--border-color);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Section Title */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 32px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i {
  color: var(--primary-light);
  font-size: 1.3rem;
  width: 28px;
  text-align: center;
}

/* Form Groups & Rows */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 640px) {
  .form-row {
    flex-direction: row;
    gap: 24px;
  }
  .form-row .form-group {
    flex: 1;
  }
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--base-text-color);
  margin-bottom: 8px;
}

.required label::after {
  content: " *";
  color: var(--accent-2);
}

/* Inputs, Selects & Textareas */
input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  color: var(--primary-color);
  background-color: var(--base-background);
  border: 2px solid var(--border-color);
  transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
  font-family: inherit;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 44px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  background-color: var(--panel-background);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

input:disabled,
select:disabled {
  background-color: var(--border-color);
  color: var(--secondary-text-color);
  opacity: 0.8;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: none;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  min-height: 54px;
}

.button-primary, button[type="submit"], .btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.button-primary:hover, button[type="submit"]:hover, .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.button-secondary, button[type="reset"], .btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
}

.button-secondary:hover, button[type="reset"]:hover, .btn-secondary:hover {
  background-color: #e2e8f0;
}

button:disabled, .btn:disabled {
  background: #cbd5e1 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
}

.btn-small {
  min-height: auto;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 10px;
}

/* Back Button Styles */
.oprec-back-nav {
  display: flex;
  width: 100%;
  margin: 0 auto 24px;
  pointer-events: none;
}
.oprec-back-nav.oprec-back-sticky {
  position: sticky;
  top: 20px;
  z-index: 1000;
}
.oprec-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary-text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  pointer-events: auto;
  transition: color var(--transition-speed) ease;
  padding: 8px 16px 8px 0;
}
.oprec-back-link:hover {
  color: var(--primary-light);
}
.oprec-back-icon {
  font-size: 16px;
}

/* Tables */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background: var(--panel-background);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background: var(--base-background);
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

tr:hover td {
  background-color: var(--base-background);
}

tr:last-child td {
  border-bottom: none;
}

/* Global Premium Toast Notification */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-color);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 10000;
  max-width: 90%;
  width: 420px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.toast-success {
  background: var(--color-success);
}
.toast-error {
  background: var(--color-error);
}
.toast-info {
  background: var(--color-info);
}

/* Global Premium Confirmation Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.modal-body {
  font-size: 0.95rem;
  color: var(--base-text-color);
  line-height: 1.5;
  max-height: 350px;
  overflow-y: auto;
}
.modal-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.modal-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--base-background);
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}
.modal-summary-label {
  font-weight: 600;
  color: var(--secondary-text-color);
}
.modal-summary-value {
  font-weight: 700;
  color: var(--primary-color);
  text-align: right;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  min-height: auto;
  transition: background-color 0.15s ease;
}
.modal-btn-confirm {
  background: var(--color-success);
  color: #ffffff;
}
.modal-btn-cancel {
  background: var(--border-color);
  color: var(--base-text-color);
}
.modal-btn-confirm:hover {
  background: #059669;
}
.modal-btn-cancel:hover {
  background: var(--secondary-text-color);
  color: var(--panel-background);
}


