@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

:root {
  --bg: #f8faff;
  --panel-bg: rgba(255, 255, 255, 0.85);
  --panel-bg-inner: #f1f4fc;
  --border: #e0e6f2;
  --border-focus: #28439b;
  --text: #26345a;
  --text-muted: #68738b;
  --primary: #28439b;
  --primary-glow: rgba(40, 67, 155, 0.08);
  --primary-hover: #172b72;
  --success: #20cbb7;
  --info: #6657d8;
  --danger: #e94b63;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Decorative Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -100px;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: hsl(265, 80%, 50%);
  bottom: -150px;
  left: -150px;
}

.app-container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.app-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 2.2rem;
}

.logo h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.accent-text {
  color: var(--primary);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Main Grid Layout */
.app-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
}

/* Panels (Glassmorphism) */
.panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  transition: var(--transition);
}

.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.panel-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  line-height: 1.2;
}

.glass-panel-inner {
  background: var(--panel-bg-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  transition: var(--transition);
  position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-glow);
  box-shadow: 0 0 15px var(--primary-glow);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.25rem;
}

.drop-text-primary {
  font-size: 1.1rem;
  font-weight: 500;
}

.drop-text-secondary {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.file-input-hidden {
  display: none;
}

/* URL Input */
.url-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.url-input-row {
  display: flex;
  gap: 0.5rem;
}

input[type="text"], select {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

input[type="text"]:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Buttons */
.btn {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(40, 67, 155, 0.25);
}

.btn-secondary {
  background-color: #f1f4fc;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background-color: #e2e8f5;
  color: var(--primary-hover);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}
.btn-danger:hover {
  background-color: hsl(354, 60%, 46%);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Preview and Status */
.preview-container {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.image-preview {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  object-fit: contain;
}

.status-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--primary);
  font-weight: 500;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--primary-glow);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Result Card */
.result-card {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-title {
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}

.result-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.confidence-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-ring-circle {
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dashoffset 0.6s ease-in-out;
}

.confidence-value {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#result-percentage {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.confidence-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.result-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#detected-breed {
  font-size: 1.5rem;
  font-weight: 700;
}

.mapped-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.tag-success {
  background-color: rgba(32, 203, 183, 0.1);
  color: #079b8d;
  border: 1px solid rgba(32, 203, 183, 0.3);
}

.tag-info {
  background-color: hsla(198, 93%, 60%, 0.15);
  color: var(--info);
  border: 1px solid hsla(198, 93%, 60%, 0.3);
}

.predictions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.predictions-list h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.predictions-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.predictions-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  background: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.pred-name {
  font-weight: 500;
}

.pred-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pred-pct {
  font-weight: 600;
  font-size: 0.85rem;
}

.json-raw {
  display: none;
  font-family: monospace;
  background: black;
  color: #a6e22e;
  padding: 1rem;
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* Breed Selector controls */
.selector-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breed-dropdown {
  width: 100%;
  cursor: pointer;
  font-weight: 500;
}

/* Breed details card */
.breed-details-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 350px;
}

.breed-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.breed-avatar {
  font-size: 2.5rem;
  background: hsla(255,255,255,0.05);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.breed-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#detail-name {
  font-size: 1.4rem;
  font-weight: 600;
}

.breed-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.detail-group p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 500px) {
  .spec-grid {
    grid-template-columns: 1fr;
  }
}

.spec-card {
  background: hsla(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.spec-icon {
  font-size: 1.4rem;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.spec-dots {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

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

/* Header Main & Auth Controls */
.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.admin-auth-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-display {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: hsla(255, 255%, 255%, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Modals & Dialogs */
.modal-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  color: var(--text);
  padding: 2rem;
  margin: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 480px;
}

.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

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

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

.btn-close-dialog {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.btn-close-dialog:hover {
  color: var(--danger);
}

/* App Layout (Sidebar + Main Content Panel) */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  width: 100vw;
  background: var(--bg);
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar navigation */
.sidebar-nav {
  background: #eef2fb;
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 900px) {
  .sidebar-nav {
    height: auto;
    position: relative;
    padding: 1rem 1.5rem;
  }
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.sidebar-logo-icon {
  font-size: 2.2rem;
}

.sidebar-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

@media (max-width: 900px) {
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    width: 100%;
  }
}

.sidebar-menu-btn {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
  width: 100%;
}

.sidebar-menu-btn:hover {
  background: rgba(40, 67, 155, 0.05);
  color: var(--primary);
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .sidebar-menu-btn:hover {
    transform: none;
  }
}

.sidebar-menu-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(40, 67, 155, 0.25);
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .sidebar-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top: none;
    border-left: 1px solid var(--border);
    padding-top: 0;
    padding-left: 1.5rem;
    width: 100%;
  }
}

.user-profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-avatar {
  font-size: 1.6rem;
  background: hsla(255, 255%, 255%, 0.05);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.profile-text {
  display: flex;
  flex-direction: column;
}

.profile-email {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-role {
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.admin-user-badge {
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* Main Content Panel */
.main-content-panel {
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
  overflow-y: auto;
  height: 100vh;
}

@media (max-width: 900px) {
  .main-content-panel {
    height: auto;
    padding: 1.5rem;
  }
}

.main-view-container {
  flex-grow: 1;
  animation: fadeIn 0.4s ease;
}

.view-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .view-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.dashboard-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .dashboard-row-grid {
    grid-template-columns: 1fr;
  }
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--panel-bg-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.stat-icon {
  font-size: 2rem;
  background: var(--primary-glow);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary);
}

.stat-icon-svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Dashboard Details */
.dashboard-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .dashboard-details {
    grid-template-columns: 1fr;
  }
}

/* Pie Chart styles */
.pie-chart-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pie-chart-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  position: relative;
}

.pie-chart-circle:hover {
  transform: scale(1.05);
}

.pie-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-width: 180px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legend-color-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-label {
  font-size: 0.88rem;
  color: var(--text);
}

.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  border-bottom: 1px solid hsla(255, 255%, 255%, 0.05);
  padding-bottom: 0.5rem;
}

.recent-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-breed {
  font-weight: 600;
}

.recent-time {
  color: var(--text-muted);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--panel-bg-inner);
  color: var(--text);
  font-weight: 600;
}

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

.admin-table tr:hover td {
  background: hsla(255, 255%, 255%, 0.02);
}

/* Forms */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input, .form-group textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.5;
  height: 48px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  width: 100%;
  height: 48px;
  padding-right: 2.75rem;
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.5;
  box-sizing: border-box;
}

.toggle-password-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.toggle-password-btn:hover {
  color: var(--primary);
  background-color: rgba(99, 102, 241, 0.08);
}

.toggle-password-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.error-msg {
  color: var(--danger);
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid var(--danger);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: hsl(145, 55%, 42%);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.w-100 {
  width: 100%;
}

/* Login View Card */
.login-view {
  max-width: 420px;
  width: 90%;
  padding: 2.5rem 2rem;
  margin: auto;
  align-self: center;
  animation: fadeIn 0.5s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-icon {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.login-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Meshy Grid & Cards */
.meshy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.meshy-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}

.meshy-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.meshy-card-thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.meshy-status-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  backdrop-filter: blur(8px);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.meshy-card-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.meshy-task-type {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meshy-prompt {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  min-height: 2.6rem;
}

.meshy-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.meshy-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.meshy-card-actions .btn {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.8rem;
}

/* Meshy 3D Viewer Modal */
.meshy-viewer-modal {
  max-width: 600px;
  width: 90%;
  padding: 1.5rem;
}

.model-viewer-body {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Custom Status tags */
.tag-warning {
  background-color: rgba(178, 94, 0, 0.1);
  color: #b25e00;
  border: 1px solid rgba(178, 94, 0, 0.25);
}

.tag-danger {
  background-color: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
  border: 1px solid rgba(211, 47, 47, 0.25);
}

/* Sidebar SVG Icons */
.menu-icon-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* Pets Ranking styles */
.ranking-item {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  list-style: none;
}

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

.ranking-item:hover {
  background: var(--primary-glow);
}

.ranking-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ranking-position {
  font-weight: 700;
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
}

.ranking-avatar-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.ranking-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-avatar-placeholder {
  font-size: 1.2rem;
}

.ranking-pet-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.ranking-pet-name {
  font-size: 0.95rem;
  color: var(--text);
}

.ranking-pet-breed {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tier-selector {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 90px;
}

.tier-selector:focus {
  border-color: var(--primary);
}

/* ==========================================================================
   ESTILOS PARA MÓDULO DE ADMINISTRACIÓN DE EVENTOS (PETCHI STADIUM)
   ========================================================================== */
.events-crud-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.events-crud-view .stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.events-crud-view .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.events-crud-view .search-filter-row select option {
  background: var(--panel-bg-inner);
  color: var(--text);
}

.events-crud-view .modal-dialog form .form-group label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  display: block;
}

.events-crud-view .modal-dialog form input[type="text"],
.events-crud-view .modal-dialog form input[type="number"],
.events-crud-view .modal-dialog form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.events-crud-view .modal-dialog form input:focus,
.events-crud-view .modal-dialog form textarea:focus {
  border-color: var(--primary);
}


