/* ============================================================================
   PupGatchi Shared Component Styles
   
   Styles for all shared Blazor components used in both Web and Mobile.
   ============================================================================ */

/* ============================================================================
   VITALITY BAR
   ============================================================================ */

.vitality-bar {
    margin-bottom: 1rem;
}

.vitality-bar.vitality-low {
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.vitality-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.vitality-icon {
    font-size: 1.1rem;
}

.vitality-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}

.vitality-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.vitality-value.value-warning {
    color: #f59e0b;
}

.vitality-value.value-critical {
    color: #ef4444;
    animation: blink 0.5s ease-in-out infinite;
}

.vitality-track {
    height: 10px;
    background: var(--track-bg, #e5e7eb);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vitality-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.vitality-fill.fill-excellent {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.vitality-fill.fill-normal {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.vitality-fill.fill-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    animation: fill-pulse 1.5s ease-in-out infinite;
}

.vitality-fill.fill-critical {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    animation: fill-pulse 0.8s ease-in-out infinite;
}

@keyframes fill-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.vitality-warning {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #f59e0b;
}

.vitality-warning span:first-child {
    font-size: 0.9rem;
}

/* ============================================================================
   VITALITY METERS (grouped display)
   ============================================================================ */

.vitality-meters {
    display: grid;
    gap: 0.75rem;
}

.vitality-meters.meters-horizontal {
    grid-template-columns: repeat(2, 1fr);
}

.vitality-meters.meters-compact {
    gap: 0.5rem;
}

.vitality-meters.meters-compact .vitality-track {
    height: 6px;
}

.vitality-meters.meters-compact .vitality-header {
    margin-bottom: 0.25rem;
}

/* ============================================================================
   ALERT CARD
   ============================================================================ */

.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alert-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-card.alert-critical {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #ef4444;
}

.alert-card.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
}

.alert-card.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #3b82f6;
}

.alert-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-card-content {
    flex: 1;
    min-width: 0;
}

.alert-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary, #1f2937);
}

.alert-card-message {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.5rem;
}

.alert-card-time {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
}

.alert-card-action {
    flex-shrink: 0;
}

.alert-card-action button {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.alert-card-action button.btn-dismiss {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary, #6b7280);
}

.alert-card-action button.btn-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
}

.alert-card-action button.btn-action {
    background: var(--primary, #3b82f6);
    color: white;
}

.alert-card-action button.btn-action:hover {
    background: var(--primary-dark, #2563eb);
}

/* ============================================================================
   QUICK ACTION BUTTONS
   ============================================================================ */

.quick-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--card-bg, white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.quick-action-btn:active {
    transform: scale(0.98);
}

.quick-action-btn.action-primary {
    background: linear-gradient(135deg, var(--primary, #3b82f6) 0%, var(--primary-dark, #2563eb) 100%);
    color: white;
}

.quick-action-btn.action-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.quick-action-btn.action-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.quick-action-btn.action-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.quick-action-icon {
    font-size: 1.5rem;
}

.quick-action-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* ============================================================================
   STAT CARD
   ============================================================================ */

.stat-card {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.stat-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted, #9ca3af);
}

.stat-card-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.stat-card-trend.trend-up {
    color: #10b981;
}

.stat-card-trend.trend-down {
    color: #ef4444;
}

.stat-card-trend.trend-stable {
    color: #6b7280;
}

/* ============================================================================
   GROWTH CHART
   ============================================================================ */

.growth-chart {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.growth-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.growth-chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

.growth-trend {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.growth-trend-gaining {
    background: #dcfce7;
    color: #15803d;
}

.growth-trend-stable {
    background: #e5e7eb;
    color: #4b5563;
}

.growth-trend-losing {
    background: #fee2e2;
    color: #b91c1c;
}

.growth-chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted, #9ca3af);
    gap: 0.75rem;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary, #3b82f6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.growth-chart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted, #9ca3af);
}

.growth-chart-empty .empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.growth-chart-empty p {
    margin: 0.25rem 0;
}

.growth-chart-empty .empty-hint {
    font-size: 0.85rem;
}

.growth-chart-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Summary stats row */
.growth-summary-row {
    display: flex;
    justify-content: space-around;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

.growth-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.growth-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
}

.growth-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
}

.growth-stat.stat-positive .stat-value {
    color: #10b981;
}

.growth-stat.stat-negative .stat-value {
    color: #ef4444;
}

/* Bar chart */
.weight-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 150px;
    gap: 4px;
    padding: 0 0.25rem;
    border-bottom: 2px solid #e5e7eb;
}

.weight-bar-wrapper {
    flex: 1;
    max-width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    cursor: default;
}

.weight-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease, background 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: auto;
}

.weight-bar.bar-up {
    background: linear-gradient(180deg, #10b981 0%, #34d399 100%);
}

.weight-bar.bar-stable {
    background: linear-gradient(180deg, #6b7280 0%, #9ca3af 100%);
}

.weight-bar.bar-down {
    background: linear-gradient(180deg, #ef4444 0%, #f87171 100%);
}

.weight-bar .bar-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    padding-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.bar-date {
    font-size: 0.65rem;
    color: var(--text-muted, #9ca3af);
    margin-top: 0.35rem;
    white-space: nowrap;
}

/* Legend */
.growth-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-dot.bar-up {
    background: #10b981;
}

.legend-dot.bar-stable {
    background: #6b7280;
}

.legend-dot.bar-down {
    background: #ef4444;
}

/* AI Insight */
.growth-insight {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.growth-insight .insight-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.growth-insight p {
    margin: 0;
    font-size: 0.85rem;
    color: #1e40af;
}

/* ============================================================================
   COMMON UTILITIES
   ============================================================================ */

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================================
   BEHAVIOR QUICK LOG
   ============================================================================ */

.behavior-quick-log {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-log-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

.last-log-message {
    font-size: 0.8rem;
    font-weight: 500;
    color: #10b981;
    padding: 0.2rem 0.5rem;
    background: #dcfce7;
    border-radius: 4px;
}

.quick-log-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quick-log-buttons.buttons-compact {
    grid-template-columns: repeat(6, 1fr);
}

.quick-log-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: inherit;
}

.quick-log-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-log-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.quick-log-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.quick-log-btn.logging {
    animation: pulse 1s ease-in-out infinite;
}

.quick-log-btn .btn-icon {
    font-size: 1.5rem;
}

.quick-log-btn .btn-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.quick-log-btn .btn-loading {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Button color variants */
.quick-log-btn.btn-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.quick-log-btn.btn-brown {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
    color: white;
}

.quick-log-btn.btn-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.quick-log-btn.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.quick-log-btn.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.quick-log-btn.btn-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

/* Compact button adjustments */
.buttons-compact .quick-log-btn {
    padding: 0.5rem 0.25rem;
}

.buttons-compact .quick-log-btn .btn-icon {
    font-size: 1.25rem;
}

.buttons-compact .quick-log-btn .btn-label {
    font-size: 0.6rem;
}

/* Recent logs */
.recent-logs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.recent-logs-title {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
    font-weight: 500;
}

.recent-log-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    color: var(--text-secondary, #6b7280);
}

.recent-log-item small {
    color: var(--text-muted, #9ca3af);
}

/* ============================================================================
   FEEDING TIMER
   ============================================================================ */

.feeding-timer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Timer states */
.feeding-timer.timer-normal {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-left: 4px solid #10b981;
}

.feeding-timer.timer-caution {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border-left: 4px solid #eab308;
}

.feeding-timer.timer-warning {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-left: 4px solid #f97316;
}

.feeding-timer.timer-critical {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    animation: timer-pulse-bg 1s ease-in-out infinite;
}

.feeding-timer.timer-overdue {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-left: 4px solid #dc2626;
    animation: timer-pulse-bg 0.5s ease-in-out infinite;
}

.feeding-timer.timer-inactive {
    background: #f3f4f6;
    border-left: 4px solid #9ca3af;
}

@keyframes timer-pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Icon container */
.timer-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-icon {
    font-size: 2rem;
}

.timer-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.3);
    animation: pulse-ring 1s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Content */
.timer-content {
    flex: 1;
    min-width: 0;
}

.timer-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    font-variant-numeric: tabular-nums;
}

.timer-countdown.countdown-urgent {
    color: #dc2626;
    animation: blink 0.5s ease-in-out infinite;
}

.overdue-text {
    color: #dc2626;
    font-weight: 700;
    animation: blink 0.5s ease-in-out infinite;
}

.timer-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0.15rem;
}

.timer-no-schedule {
    font-size: 0.9rem;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

/* Action button */
.timer-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.timer-action-btn:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timer-action-btn:active {
    transform: scale(0.98);
}

.timer-action-btn span:first-child {
    font-size: 1.25rem;
}

/* ============================================================================
   COMMON UTILITIES
   ============================================================================ */

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================================
   BEHAVIOR QUICK LOG
   ============================================================================ */

.behavior-quick-log {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-log-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

.last-log-message {
    font-size: 0.8rem;
    font-weight: 500;
    color: #10b981;
    padding: 0.2rem 0.5rem;
    background: #dcfce7;
    border-radius: 4px;
}

.quick-log-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quick-log-buttons.buttons-compact {
    grid-template-columns: repeat(6, 1fr);
}

.quick-log-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: inherit;
}

.quick-log-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-log-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.quick-log-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.quick-log-btn.logging {
    animation: pulse 1s ease-in-out infinite;
}

.quick-log-btn .btn-icon {
    font-size: 1.5rem;
}

.quick-log-btn .btn-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.quick-log-btn .btn-loading {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Button color variants */
.quick-log-btn.btn-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.quick-log-btn.btn-brown {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
    color: white;
}

.quick-log-btn.btn-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.quick-log-btn.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.quick-log-btn.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.quick-log-btn.btn-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

/* Compact button adjustments */
.buttons-compact .quick-log-btn {
    padding: 0.5rem 0.25rem;
}

.buttons-compact .quick-log-btn .btn-icon {
    font-size: 1.25rem;
}

.buttons-compact .quick-log-btn .btn-label {
    font-size: 0.6rem;
}

/* Recent logs */
.recent-logs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.recent-logs-title {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
    font-weight: 500;
}

.recent-log-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    color: var(--text-secondary, #6b7280);
}

.recent-log-item small {
    color: var(--text-muted, #9ca3af);
}

/* ============================================================================
   FEEDING TIMER
   ============================================================================ */

.feeding-timer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Timer states */
.feeding-timer.timer-normal {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-left: 4px solid #10b981;
}

.feeding-timer.timer-caution {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border-left: 4px solid #eab308;
}

.feeding-timer.timer-warning {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-left: 4px solid #f97316;
}

.feeding-timer.timer-critical {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    animation: timer-pulse-bg 1s ease-in-out infinite;
}

.feeding-timer.timer-overdue {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-left: 4px solid #dc2626;
    animation: timer-pulse-bg 0.5s ease-in-out infinite;
}

.feeding-timer.timer-inactive {
    background: #f3f4f6;
    border-left: 4px solid #9ca3af;
}

@keyframes timer-pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Icon container */
.timer-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-icon {
    font-size: 2rem;
}

.timer-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.3);
    animation: pulse-ring 1s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Content */
.timer-content {
    flex: 1;
    min-width: 0;
}

.timer-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    font-variant-numeric: tabular-nums;
}

.timer-countdown.countdown-urgent {
    color: #dc2626;
    animation: blink 0.5s ease-in-out infinite;
}

.overdue-text {
    color: #dc2626;
    font-weight: 700;
    animation: blink 0.5s ease-in-out infinite;
}

.timer-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0.15rem;
}

.timer-no-schedule {
    font-size: 0.9rem;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

/* Action button */
.timer-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.timer-action-btn:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timer-action-btn:active {
    transform: scale(0.98);
}

.timer-action-btn span:first-child {
    font-size: 1.25rem;
}

/* ============================================================================
   EMERGENCY BUTTON
   ============================================================================ */

.emergency-button-container {
    position: relative;
}

/* Main emergency button */
.emergency-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
    transition: all 0.2s ease;
    font-family: inherit;
}

.emergency-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.emergency-btn:active {
    transform: scale(0.98);
}

.emergency-btn .btn-icon {
    font-size: 1.25rem;
}

.emergency-btn-compact {
    padding: 0.75rem;
    border-radius: 50%;
}

.emergency-btn-compact .btn-icon {
    font-size: 1.5rem;
}

/* Emergency panel */
.emergency-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
    overflow: hidden;
    z-index: 1000;
}

.emergency-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.emergency-panel-header .panel-icon {
    font-size: 1.25rem;
}

.emergency-panel-header .panel-title {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.emergency-panel-header .panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.emergency-panel-header .panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Emergency options */
.emergency-options {
    padding: 0.5rem;
}

.emergency-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.emergency-option:hover {
    background: #f3f4f6;
}

.emergency-option .option-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.emergency-option.option-critical .option-icon {
    background: #fee2e2;
}

.emergency-option.option-warning .option-icon {
    background: #fef3c7;
}

.emergency-option.option-danger .option-icon {
    background: #fce7f3;
}

.emergency-option.option-info .option-icon {
    background: #dbeafe;
}

.emergency-option .option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.emergency-option .option-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.emergency-option .option-desc {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}

.emergency-option .option-arrow {
    color: var(--text-muted, #9ca3af);
    font-size: 1.1rem;
}

/* Emergency call button */
.emergency-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.emergency-call-btn:hover {
    transform: scale(1.02);
}

.emergency-call-btn span:first-child {
    font-size: 1.25rem;
}

/* Disclaimer */
.emergency-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    font-size: 0.75rem;
    color: #92400e;
}

.emergency-disclaimer span {
    flex-shrink: 0;
}
