/* ===========================
   RESET & VARIABLES
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #0c50fd;
  --primary-blue-dark: #0a3db5;
  --secondary-blue: #4a7bd8;
  --accent-red: #f4736e;
  --accent-green: #34c759;
  --accent-cyan: #17d4d4;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --text-dark: #101113;
  --text-light: #999999;
  --border-radius: 20px;
  --border-radius-sm: 10px;
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===========================
   TYPOGRAPHY & BASE STYLES
   =========================== */

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  width: 100%;
}

body {
  background: linear-gradient(135deg, #1a1f3a 0%, #2d2e4f 100%);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */

.container {
  max-width: 375px;
  margin: 0 auto;
  padding: 0;
  background: linear-gradient(135deg, #1a1f3a 0%, #2d2e4f 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 20px 16px 16px 16px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header-top h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 2px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.header-status {
  display: flex;
  align-items: center;
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  animation: pulse 2s infinite;
}

.status-badge.online {
  color: #34c759;
  background: rgba(52, 199, 89, 0.15);
  border-color: rgba(52, 199, 89, 0.3);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.content {
  flex: 1;
  padding: 12px 12px 20px 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.content::-webkit-scrollbar {
  width: 6px;
}

.content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* ===========================
   CARD COMPONENTS
   =========================== */

.card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInUp 0.5s ease-out;
}

.card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.card-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
  font-weight: 500;
}

/* ===========================
   SENSOR STATS
   =========================== */

.stats-container {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: space-between;
}

.stat-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 14px 12px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform: translateY(0);
}

.stat-box:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 26px;
  margin-bottom: 6px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.stat-box:nth-child(1) .stat-icon {
  animation-delay: 0s;
}

.stat-box:nth-child(2) .stat-icon {
  animation-delay: 0.2s;
}

.stat-box:nth-child(3) .stat-icon {
  animation-delay: 0.4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
  letter-spacing: -0.4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===========================
   LCD STATUS CARD - TERPISAH
   =========================== */

.lcd-status-card {
  border: 2px solid var(--accent-green) !important;
  background: rgba(52, 199, 89, 0.08) !important;
  margin-bottom: 12px;
  animation: slideInUp 0.5s ease-out 0.1s both;
}

.lcd-status-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}}

.lcd-status-content {
  background: rgba(16, 17, 19, 0.5);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--white);
  margin-bottom: 10px;
  border: 1px solid rgba(52, 199, 89, 0.2);
  transition: all 0.3s ease;
}

.lcd-status-content:hover {
  border-color: rgba(52, 199, 89, 0.4);
  box-shadow: 0 0 16px rgba(52, 199, 89, 0.1);
}

.lcd-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.2px;
}

.lcd-line:last-child {
  border-bottom: none;
}

.lcd-label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  min-width: 80px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.lcd-value {
  color: var(--accent-green);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(52, 199, 89, 0.3);
}

.lcd-status {
  color: var(--accent-green);
  font-weight: 800;
  min-width: 40px;
  font-size: 13px;
}

.lcd-pump-in,
.lcd-pump-out {
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  min-width: 45px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.lcd-pump-in.on,
.lcd-pump-out.on {
  background: rgba(52, 199, 89, 0.4);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(52, 199, 89, 0.2);
}

.lcd-pump-in.off,
.lcd-pump-out.off {
  background: rgba(244, 115, 110, 0.3);
  color: #ff9999;
  box-shadow: 0 0 12px rgba(244, 115, 110, 0.1);
}

.lcd-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin: 0;
  font-style: italic;
  letter-spacing: 0.2px;
}

/* ===========================
   SECTION - PEMBERIAN MAKAN
   =========================== */

.section-feeding {
  margin-bottom: 12px;
  animation: slideInUp 0.5s ease-out 0.2s both;
}

.feeding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.feeding-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.auto-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.toggle-switch {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(52, 199, 89, 0.8);
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(52, 199, 89, 0.3);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--white);
  border-radius: 50%;
  top: 2px;
  right: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.off {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.toggle-switch.off::after {
  right: auto;
  left: 2px;
}

.feeding-info {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.feeding-schedule {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.feeding-schedule:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.schedule-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.schedule-time {
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.schedule-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-weight: 500;
}

.schedule-status {
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-feeding-now {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-red) 0%, #ff6b6b 100%);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(244, 115, 110, 0.3);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-feeding-now:hover {
  background: linear-gradient(135deg, #ff6b6b 0%, var(--accent-red) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(244, 115, 110, 0.4);
}

.btn-feeding-now:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(244, 115, 110, 0.3);
}

.feeding-buttons-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: flex-end;
}

.btn-feeding-stop {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-feeding-stop:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-feeding-stop:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===========================
   SECTION - WATER CHANGE
   =========================== */

.section-water {
  margin-bottom: 12px;
  animation: slideInUp 0.5s ease-out 0.3s both;
}

.water-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.water-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
  font-weight: 500;
}

.water-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.water-buttons.full-width {
  grid-template-columns: 1fr 1fr;
}

.btn-water {
  padding: 13px 14px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-water:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-water:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-water.discard {
  background: linear-gradient(135deg, var(--accent-red) 0%, #ff6b6b 100%);
  box-shadow: 0 4px 12px rgba(244, 115, 110, 0.3);
}

.btn-water.discard:hover {
  box-shadow: 0 8px 20px rgba(244, 115, 110, 0.4);
}

.btn-water.discard-stop {
  background: linear-gradient(135deg, #d9534f 0%, #c9423f 100%);
  box-shadow: 0 4px 12px rgba(217, 83, 79, 0.3);
  opacity: 0.85;
}

.btn-water.discard-stop:hover {
  opacity: 1;
  box-shadow: 0 8px 20px rgba(217, 83, 79, 0.4);
}

.btn-water.fill {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #6b9ffd 100%);
  box-shadow: 0 4px 12px rgba(12, 80, 253, 0.3);
}

.btn-water.fill:hover {
  box-shadow: 0 8px 20px rgba(12, 80, 253, 0.4);
}

.btn-water.fill-stop {
  background: linear-gradient(135deg, #2d5aa6 0%, #1d4a96 100%);
  box-shadow: 0 4px 12px rgba(45, 90, 166, 0.3);
  opacity: 0.85;
}

.btn-water.fill-stop:hover {
  opacity: 1;
  box-shadow: 0 8px 20px rgba(45, 90, 166, 0.4);
}

.btn-water-change {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #00e8e8 100%);
  color: #1a1a1a;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(23, 212, 212, 0.3);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-water-change:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(23, 212, 212, 0.4);
  background: linear-gradient(135deg, #00e8e8 0%, var(--accent-cyan) 100%);
}

.btn-water-change:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(23, 212, 212, 0.3);
}

.btn-water-change-stop {
  width: 100%;
  background: linear-gradient(135deg, #0fa9a9 0%, #0a8989 100%);
  opacity: 0.85;
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(15, 169, 169, 0.3);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-water-change-stop:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 169, 169, 0.4);
}

.btn-water-change-stop:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(15, 169, 169, 0.3);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: flex-end;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(4px);
  }
}

.modal-content {
  background: var(--white);
  width: 100%;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  padding: 24px 20px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 5px;
  background: #e0e0e0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.duration-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.duration-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e8e8e8;
  border-radius: var(--border-radius-sm);
  background: #f9f9f9;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(12, 80, 253, 0.1);
  transform: translateY(-1px);
}

.duration-hint {
  font-size: 11px;
  color: var(--text-light);
  margin: 0;
  text-align: center;
  letter-spacing: 0.1px;
}

/* Chrome, Safari and Opera */
.duration-input::-webkit-outer-spin-button,
.duration-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.duration-input[type=number] {
  -moz-appearance: textfield;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.form-description {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 0.1px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e8e8e8;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f9f9f9;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(12, 80, 253, 0.1);
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.time-input {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-blue);
  text-align: center;
  padding: 16px;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius-sm);
}

.time-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  color: var(--text-light);
}

.portion-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.portion-btn {
  padding: 12px 10px;
  border: 2px solid #e8e8e8;
  border-radius: var(--border-radius-sm);
  background: #f9f9f9;
  color: var(--text-dark);
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.portion-btn:hover {
  border-color: var(--primary-blue);
  background: rgba(12, 80, 253, 0.05);
}

.portion-btn.active {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #6b9ffd 100%);
  color: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(12, 80, 253, 0.3);
  transform: translateY(-1px);
}

.portion-label {
  display: block;
  font-size: 10px;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.days-selector {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.day-btn {
  padding: 10px 6px;
  border: 2px solid #e8e8e8;
  border-radius: var(--border-radius-sm);
  background: #f9f9f9;
  color: var(--primary-blue);
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.1px;
}

.day-btn:hover {
  border-color: var(--primary-blue);
  background: rgba(12, 80, 253, 0.05);
}

.day-btn.active {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #6b9ffd 100%);
  color: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(12, 80, 253, 0.3);
  transform: translateY(-1px);
}

.schedule-list {
  background: #f5f7fa;
  border-radius: var(--border-radius-sm);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  transition: all 0.3s ease;
}

.schedule-item {
  padding: 14px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white);
}

.schedule-item:hover {
  background: #f9fbfd;
  transform: translateX(4px);
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-item-time {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-blue);
  min-width: 60px;
  letter-spacing: -0.3px;
}

.schedule-item-details {
  flex: 1;
  margin-left: 16px;
  font-size: 13px;
}

.schedule-item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.schedule-item-portion {
  font-size: 12px;
  color: var(--text-light);
}

.schedule-item-delete {
  background: transparent;
  border: none;
  color: #d0d0d0;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
}

.schedule-item-delete:hover {
  color: var(--accent-red);
  transform: scale(1.2);
}

.add-schedule-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--primary-blue);
  border-radius: var(--border-radius-sm);
  background: rgba(12, 80, 253, 0.03);
  color: var(--primary-blue);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-schedule-btn:hover {
  background: rgba(12, 80, 253, 0.08);
  border-color: #6b9ffd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(12, 80, 253, 0.2);
}

.modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--light-gray);
  padding-top: 20px;
}

.btn-modal {
  padding: 12px 16px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-modal:hover {
  transform: translateY(-2px);
}

.btn-modal:active {
  transform: translateY(0) scale(0.98);
}

.btn-cancel {
  background: #f0f0f0;
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-cancel:hover {
  background: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #6b9ffd 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(12, 80, 253, 0.3);
}

.btn-submit:hover {
  box-shadow: 0 8px 20px rgba(12, 80, 253, 0.4);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (min-width: 600px) {
  .container {
    max-width: 600px;
    border-radius: 24px;
    margin: 16px auto;
    max-height: 90vh;
    overflow: hidden;
  }

  .header {
    padding-top: 20px;
  }

  .stats-container {
    gap: 12px;
  }

  .stat-box {
    padding: 20px;
  }
}

@media (max-width: 375px) {
  .container {
    max-width: 100%;
  }

  .header {
    padding: 16px 14px 12px 14px;
  }

  .header-title {
    font-size: 24px;
  }

  .header-subtitle {
    font-size: 10px;
  }

  .content {
    padding: 10px 10px 16px 10px;
  }

  .stats-container {
    gap: 8px;
    margin-bottom: 14px;
  }

  .stat-box {
    padding: 12px 10px;
  }

  .stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
  }

  .stat-value {
    font-size: 18px;
    margin-bottom: 1px;
  }

  .stat-label {
    font-size: 9px;
    letter-spacing: 0.2px;
  }

  .card {
    padding: 16px;
    margin-bottom: 10px;
  }

  .card-title {
    font-size: 14px;
    margin-bottom: 3px;
  }

  .card-subtitle {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .water-buttons {
    gap: 8px;
    margin-bottom: 8px;
  }

  .btn-water,
  .btn-feeding-now,
  .btn-feeding-stop,
  .btn-water-change,
  .btn-water-change-stop {
    padding: 12px 12px;
    font-size: 13px;
    min-height: 42px;
  }

  .feeding-buttons-group {
    gap: 8px;
  }

  .modal-content {
    padding: 20px 16px;
  }

  .modal-title {
    font-size: 16px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 11px 12px;
    font-size: 13px;
  }

  .btn-modal {
    padding: 11px 14px;
    font-size: 13px;
    min-height: 42px;
  }

  .schedule-item {
    padding: 12px;
  }

  .schedule-item-time {
    font-size: 15px;
    min-width: 55px;
  }

  .schedule-item-details {
    margin-left: 12px;
    font-size: 12px;
  }

  .schedule-item-label {
    font-size: 12px;
    margin-bottom: 1px;
  }

  .lcd-status-content {
    padding: 10px;
    font-size: 11px;
    margin-bottom: 8px;
  }

  .lcd-line {
    padding: 5px 0;
  }

  .feeding-schedule {
    padding: 10px;
    margin-bottom: 10px;
  }

  .schedule-time {
    font-size: 15px;
    margin-bottom: 1px;
  }

  .schedule-title {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .schedule-subtitle {
    font-size: 10px;
  }

  .portion-btn {
    padding: 10px 8px;
    font-size: 11px;
  }

  .day-btn {
    padding: 9px 5px;
    font-size: 10px;
  }

  .add-schedule-btn {
    padding: 12px;
    font-size: 13px;
    min-height: 42px;
  }
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* ===========================
   UTILITIES
   =========================== */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.p-16 {
  padding: 16px;
}

.text-white {
  color: var(--white);
}

.text-muted {
  color: rgba(255, 255, 255, 0.8);
}

.divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 16px 0;
}
