/* Minimalist Premium Design System for PETCARE */
:root {
  --primary: #5c8d89; /* Safe sage green */
  --primary-rgb: 92, 141, 137;
  --primary-hover: #4b7470;
  
  --secondary: #709fb0; /* Light steel blue */
  --secondary-rgb: 112, 159, 176;
  
  --bg-light: #f7f9fa; /* Clean light gray */
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  
  --text-main: #2d3748;
  --text-muted: #718096;
  
  --success: #68bb59;
  --warning: #ed9b40;
  --danger: #d9534f;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Common Layout Elements */
.view-section {
  width: 100%;
  min-height: 100vh;
}

/* 1. LOGIN SCREEN */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  min-height: 480px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.login-brand {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.07) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--card-border);
}

.brand-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.login-brand h1 {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 800;
}

.login-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.login-form {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form h2 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

/* Form Fields */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-light);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.input-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #5c8492;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-light);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* 2. DASHBOARD FRAME */
.app-container {
  display: flex;
  min-height: 100vh;
}

#dashboard-view {
  display: flex;
  width: 100%;
}

.sidebar {
  width: 260px;
  background-color: var(--card-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 30px;
}

.logo {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.logo-icon {
  font-size: 1.8rem;
  margin-right: 8px;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--bg-light);
  border-radius: var(--border-radius);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 10px;
}

.user-details h4 {
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.user-role-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-menu {
  flex-grow: 1;
}

.sidebar-menu ul {
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.menu-item:hover, .menu-item.active {
  background-color: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
}

.menu-item-icon {
  margin-right: 8px;
  font-size: 1.1rem;
}

.main-content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  max-height: 100vh;
}

/* 3. CARD AND DASHBOARD PANELS */
.dashboard-panel {
  width: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.panel-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.panel-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 14px;
  margin-top: 10px;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
  position: relative;
  transition: var(--transition);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Grids */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.owner-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-2-columns {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

.grid-layout-30-70 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

/* Pet Card Styling */
.pet-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  cursor: pointer;
}

.pet-card:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  transform: translateY(-2px);
}

.pet-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.pet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(var(--secondary-rgb), 0.12);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-right: 12px;
}

.pet-card-info h3 {
  font-size: 0.95rem;
}

.pet-card-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pet-stats-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--bg-light);
  padding-top: 10px;
  margin-top: auto;
}

.pet-stat-item {
  display: flex;
  flex-direction: column;
}

.pet-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.pet-stat-val {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Vaccine Badge inside list */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-success { background: rgba(104, 187, 89, 0.12); color: var(--success); }
.badge-warning { background: rgba(237, 155, 64, 0.12); color: var(--warning); }
.badge-danger { background: rgba(217, 83, 79, 0.12); color: var(--danger); }

/* Table Design */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.minimalist-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.minimalist-table th {
  padding: 12px 14px;
  border-bottom: 2px solid var(--bg-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.minimalist-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg-light);
  font-size: 0.85rem;
}

.minimalist-table tr:hover {
  background-color: var(--bg-light);
}

/* Holiday Mini List */
.holiday-mini-list {
  list-style: none;
  margin-top: 10px;
}

.holiday-mini-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 6px 0;
  border-bottom: 1px dashed var(--card-border);
}

.holiday-mini-item:last-child {
  border-bottom: none;
}

.holiday-alert-box {
  background: rgba(112, 159, 176, 0.08);
  border: 1px solid rgba(112, 159, 176, 0.15);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.alert-icon {
  font-size: 1rem;
}

/* 4. VET SPECIFICS */
.vet-patient-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.vet-patient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.vet-patient-row:hover, .vet-patient-row.selected {
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.03);
}

.vet-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.pet-avatar-big {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.tab-container {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 6px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.clinical-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  padding: 12px;
  background: var(--bg-light);
  border-radius: 8px;
  font-size: 0.8rem;
}

.history-item-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.vaccine-history-list {
  list-style: none;
}

.vaccine-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-light);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

/* Chat UI */
.chat-box {
  border: 1px solid var(--card-border);
  background: var(--bg-light);
  height: 240px;
  border-radius: var(--border-radius);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.chat-bubble.sent {
  background-color: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-bubble.received {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  outline: none;
  font-size: 0.85rem;
}

/* 5. HOTEL SPECIFICS */
.hotel-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.hotel-kpis-grid .kpi-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kpi-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

.kpi-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.hotel-rooms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.hotel-room {
  background: var(--bg-light);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.hotel-room:hover {
  transform: scale(1.02);
}

.hotel-room.vacant {
  border-color: rgba(104, 187, 89, 0.4);
  background: rgba(104, 187, 89, 0.02);
}

.hotel-room.occupied {
  border-color: rgba(112, 159, 176, 0.4);
  background: rgba(112, 159, 176, 0.03);
}

.room-number {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.room-status {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.room-status.lbl-vacant {
  color: var(--success);
}

.room-status.lbl-occupied {
  color: var(--secondary);
}

.room-pet-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.holiday-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.holiday-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: var(--bg-light);
  border-radius: 8px;
  font-size: 0.8rem;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 460px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
}

/* Flex utilities */
.flex-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.search-bar {
  margin-bottom: 12px;
}

.search-bar input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  outline: none;
  font-size: 0.85rem;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .login-card {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .login-brand {
    display: none;
  }
  #dashboard-view {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
    padding: 16px 20px;
  }
  .sidebar-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .logo {
    margin-bottom: 0;
  }
  .user-profile-badge {
    padding: 6px 10px;
  }
  .sidebar-menu {
    margin: 10px 0;
  }
  .sidebar-menu ul {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .menu-item {
    margin-bottom: 0;
    white-space: nowrap;
  }
  .main-content {
    padding: 20px;
  }
  .owner-actions-grid, .grid-2-columns, .grid-layout-30-70 {
    grid-template-columns: 1fr;
  }
  .hotel-rooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hotel-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
