/* ========== STANDARDIZED STYLES ========== */
/* This file contains standardized styles for the PTRB Complaint System */

/* ---------- VARIABLES ---------- */
:root {
  /* Color Palette */
  --primary-color: #275a89;
  --primary-dark: #1a3f61;
  --primary-light: #3a7ab3;
  --secondary-color: #03045e;
  --secondary-dark: #020340;
  --secondary-light: #0b5ed7;

  /* Text Colors */
  --text-dark: #333;
  --text-medium: #555;
  --text-light: #6c757d;

  /* Background Colors */
  --bg-light: #f8f9fa;
  --bg-white: #fff;
  --bg-gray: #f5f5f5;

  /* Border Colors */
  --border-color: #e8e8e8;
  --border-light: #e9ecef;

  /* Status Colors */
  --status-new: #0d6efd;
  --status-pending: #ffc107;
  --status-in-progress: #17a2b8;
  --status-resolved: #198754;
  --status-closed: #6c757d;
  --status-rejected: #dc3545;

  /* Alert Colors */
  --alert-danger-bg: #f8d7da;
  --alert-danger-text: #721c24;
  --alert-danger-border: #f5c6cb;
  --alert-success-bg: #d4edda;
  --alert-success-text: #155724;
  --alert-success-border: #c3e6cb;
  --alert-info-bg: #d1ecf1;
  --alert-info-text: #0c5460;
  --alert-info-border: #bee5eb;
  --alert-warning-bg: #fff3cd;
  --alert-warning-text: #856404;
  --alert-warning-border: #ffeeba;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;

  /* Spacing */
  --spacing-xs: 10px;
  --spacing-sm: 15px;
  --spacing-md: 25px;
  --spacing-lg: 40px;

  /* Typography */
  --font-family: Arial, Sans-serif;
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-md: 1.125rem; /* 18px */
  --font-size-lg: 1.25rem; /* 20px */
  --font-size-xl: 1.5rem; /* 24px */
  --font-size-2xl: 1.75rem; /* 28px */
  --font-size-3xl: 2rem; /* 32px */
  --font-size-4xl: 2.25rem; /* 36px */

  /* Layout */
  --container-width: 1200px;
  --header-height: 15vh;

  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
}

/* ---------- RESET & BASE STYLES ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- LAYOUT COMPONENTS ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.card-body {
  padding: var(--spacing-md);
}

.card-footer {
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

/* ---------- TYPOGRAPHY ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text-dark);
  font-family: var(--font-family);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-md);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: 1rem;
  font-family: var(--font-family);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

.text-muted {
  color: var(--text-light);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: var(--font-size-base);
  line-height: 1.5;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
  font-family: var(--font-family);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--bg-white);
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
}

/* ---------- FORMS ---------- */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-family: var(--font-family);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--bg-white);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  font-family: var(--font-family);
}

.form-control:focus {
  border-color: var(--primary-light);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(39, 90, 137, 0.25);
}

textarea.form-control {
  height: auto;
  resize: vertical;
}

/* ---------- ALERTS ---------- */
.alert {
  position: relative;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
}

.alert-danger {
  background-color: var(--alert-danger-bg);
  color: var(--alert-danger-text);
  border-color: var(--alert-danger-border);
}

.alert-success {
  background-color: var(--alert-success-bg);
  color: var(--alert-success-text);
  border-color: var(--alert-success-border);
}

.alert-info {
  background-color: var(--alert-info-bg);
  color: var(--alert-info-text);
  border-color: var(--alert-info-border);
}

.alert-warning {
  background-color: var(--alert-warning-bg);
  color: var(--alert-warning-text);
  border-color: var(--alert-warning-border);
}

/* ---------- STATUS BADGES ---------- */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 2;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
}

.status-new,
.status-pending {
  background-color: var(--status-new);
  color: var(--bg-white);
}

.status-in-progress {
  background-color: var(--status-in-progress);
  color: var(--bg-white);
}

.status-resolved {
  background-color: var(--status-resolved);
  color: var(--bg-white);
}

.status-closed {
  background-color: var(--status-closed);
  color: var(--bg-white);
}

.status-rejected {
  background-color: var(--status-rejected);
  color: var(--bg-white);
}

/* ---------- TABLES ---------- */
.table {
  width: 100%;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
  border-collapse: collapse;
  font-family: var(--font-family);
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid var(--border-light);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--border-light);
  font-weight: 600;
}

.table tbody + tbody {
  border-top: 2px solid var(--border-light);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ---------- UTILITIES ---------- */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mt-5 {
  margin-top: 3rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

/* ---------- RESPONSIVE UTILITIES ---------- */
@media (max-width: 1200px) {
  :root {
    --container-width: 960px;
  }
}

@media (max-width: 992px) {
  :root {
    --container-width: 720px;
  }

  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }
}

@media (max-width: 768px) {
  :root {
    --container-width: 540px;
    --spacing-lg: 30px;
    --spacing-md: 20px;
  }

  h1 {
    font-size: var(--font-size-xl);
  }

  .d-md-none {
    display: none !important;
  }

  .d-md-block {
    display: block !important;
  }

  .d-md-flex {
    display: flex !important;
  }
}

@media (max-width: 576px) {
  :root {
    --spacing-lg: 20px;
    --spacing-md: 15px;
    --spacing-sm: 10px;
  }

  .d-sm-none {
    display: none !important;
  }

  .d-sm-block {
    display: block !important;
  }

  .d-sm-flex {
    display: flex !important;
  }
}
