/* ICED/UFOPA — Design System Institucional */
:root {
  --ufopa-blue: #003366;
  --ufopa-light-blue: #005a9c;
  --ufopa-accent: #0284c7;
  --ufopa-gold: #f59e0b;
  --bg-slate: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-slate);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--ufopa-blue) 0%, var(--ufopa-light-blue) 100%);
  color: white;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ufopa-blue);
  font-weight: 900;
  font-size: 1.1rem;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-text p {
  font-size: 0.82rem;
  opacity: 0.9;
}

.badge-semestre {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Main Container */
main {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  flex: 1;
  width: 100%;
}

/* Filter Controls */
.controls-card {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--ufopa-accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-primary {
  background: var(--ufopa-light-blue);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--ufopa-blue);
}

.btn-outline {
  background: transparent;
  color: var(--ufopa-light-blue);
  border: 1px solid var(--ufopa-light-blue);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline:hover {
  background: #eff6ff;
}

/* Room Cards Grid */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.room-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.room-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.room-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ufopa-blue);
}

.room-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.tag-pcd {
  background: #dcfce7;
  color: #15803d;
}

.tag-cap {
  background: #e0f2fe;
  color: #0369a1;
}

.room-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.current-status {
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.status-occupied {
  background: #fef2f2;
  border-left: 4px solid var(--danger);
}

.status-free {
  background: #f0fdf4;
  border-left: 4px solid var(--success);
}

.room-card-footer {
  padding: 0.85rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
}

/* Footer */
footer {
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2rem;
}
