body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.sidebar{background-color:#f8f9fa;box-shadow:2px 0 5px #0000001a;display:flex;flex-direction:column;height:100%;left:0;padding:20px;position:fixed;top:0;transition:all .3s ease;width:200px;z-index:1000}@media (max-width:480px){.sidebar{align-items:center;background-color:#f8f9fa;box-shadow:0 2px 5px #0000001a;flex-direction:row;flex-wrap:wrap;height:60px;justify-content:space-between;padding:5px 10px;position:fixed;width:100%}.logo{height:40px!important;margin:0!important;width:40px!important}.sidebar ul{display:flex;flex-direction:row;justify-content:center;margin:0;padding:0;width:auto}.sidebar li{margin:0 8px!important}.logout-container{align-items:center;display:flex;flex-direction:row;margin:0!important}.nav-item span{display:none}.logout-container span{display:inline-block;font-size:12px;margin-left:4px}.logout-icon{height:20px;width:20px}}@media (min-width:481px) and (max-width:768px){.sidebar{padding:15px 10px;width:100px;z-index:1000}.logo{height:70px;margin-bottom:20px;width:70px}.nav-item span{display:none}.sidebar ul{padding-left:0}.sidebar li{display:flex;justify-content:center;margin-bottom:15px}.nav-item{display:flex}.logout-container,.nav-item{align-items:center;flex-direction:column}.logout-container span{display:inline-block;font-size:12px;margin-top:4px}.logout-icon{margin-bottom:5px;margin-right:0}}.logo{display:block;height:150px;margin:0 auto;width:150px}.sidebar ul{list-style-type:none;margin-bottom:auto;padding:0}.sidebar li{margin-bottom:20px}.sidebar li:last-child{margin-bottom:0}.sidebar a{align-items:center;color:#333;display:flex;text-decoration:none}.sidebar a span{margin-left:10px}.nav-item{align-items:center;display:flex}.group-icon,.home-icon,.settings-icon{height:30px;width:30px}.logout-container{align-items:center;cursor:pointer;display:flex;margin-bottom:40px;margin-top:auto}.logout-icon{height:20px;margin-right:10px;width:20px}@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){.sidebar{padding:15px 10px;width:80px}.logo{height:60px;margin-bottom:20px;width:60px}.nav-item span{display:none}.sidebar ul{padding-left:0}.sidebar li{display:flex;justify-content:center;margin-bottom:15px}.nav-item{display:flex}.logout-container,.nav-item{align-items:center;flex-direction:column}.logout-icon{margin-bottom:5px;margin-right:0}}table{margin-bottom:20px}td,th{border:1px solid #ddd}th{background-color:#3a3f1c;color:#fff}.name,th{font-weight:700}.name{color:#000}.confirmation-overlay{z-index:9999}.confirmation-dialog{border-radius:4px;box-shadow:0 2px 4px #0003}.confirmation-buttons{justify-content:space-between}.confirmation-buttons button{font-size:14px;padding:8px 16px}.delete-button{align-items:center;background-color:#dc3545;display:flex;justify-content:center;padding:6px 12px}.delete-button img{filter:invert(1);height:16px;width:16px}.pigs-table{table-layout:fixed}.pigs-table td,.pigs-table th{border:1px solid #ddd;padding:12px}.table-container{border-radius:10px;box-shadow:0 4px 6px #0000001a;flex:1 1;margin-bottom:10px;padding:20px}.pigs-table th{background-color:#3a3f1c;font-weight:700}.pigs-table td:first-child,.pigs-table th:first-child{width:50%}.pigs-table td:nth-child(2),.pigs-table th:nth-child(2){width:20%}.pigs-table td:nth-child(3),.pigs-table th:nth-child(3){width:10%}.pigs-container{padding-left:23px;padding-top:20px}.pigs-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:20px}.pigs-header>div{align-items:flex-start;display:flex;flex-direction:column}.last-update{color:#666}.last-update,.refresh-error{font-size:.8em;margin-top:4px}.refresh-error{color:#dc3545;font-weight:700}.centered-title{font-size:1.8rem;margin:0;padding:0;text-align:center}@media (max-width:480px){.pigs-container{padding-left:0;padding-top:70px}.centered-title{font-size:1.5rem}}@media (min-width:481px) and (max-width:768px){.pigs-container{padding-left:110px;padding-top:30px}}.table-container{margin-top:20px;overflow-x:auto}.pigs-table{border-collapse:collapse;width:100%}.pigs-table td,.pigs-table th{border-bottom:1px solid #ddd;overflow:hidden;padding:10px;text-align:left;text-overflow:ellipsis;white-space:nowrap}@media (max-width:480px){.pigs-table th{font-size:14px;padding:8px 4px}.pigs-table td{font-size:13px;padding:8px 4px}.pigs-container{padding-top:70px}}@media (min-width:481px) and (max-width:768px){.pigs-table th{font-size:15px;padding:8px 6px}.pigs-table td{font-size:14px;padding:8px 6px}}@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){.pigs-container{padding-top:20px}.pigs-table td,.pigs-table th{font-size:14px;padding:8px 6px}.table-container{padding:15px}}@media (max-width:480px){.pigs-table td:first-child,.pigs-table td:nth-child(2),.pigs-table th:first-child,.pigs-table th:nth-child(2){width:40%}.pigs-table td:nth-child(3),.pigs-table th:nth-child(3){width:20%}}.pigs-table th{background-color:#4a5d23;color:#fff}.pigs-table tr:hover{background-color:#f5f5f5}.delete-button{background:none;border-radius:4px;padding:5px;transition:background-color .2s}.delete-button img{filter:invert(15%) sepia(90%) saturate(6500%) hue-rotate(1turn) brightness(90%) contrast(100%)}.delete-button:hover{background-color:#f8d7da}.delete-button:hover img{filter:invert(15%) sepia(90%) saturate(6500%) hue-rotate(1turn) brightness(70%) contrast(100%)}@media (max-width:480px){.pigs-container{padding-top:20px}}@media (min-width:481px) and (max-width:768px){.pigs-container{padding-top:30px}}.confirmation-overlay{z-index:1001}.confirmation-dialog{border-radius:5px;box-shadow:0 2px 10px #0003;padding:20px;width:90%}.confirmation-buttons{gap:10px;margin-top:20px}.confirmation-buttons button{border:none;border-radius:4px;cursor:pointer;padding:8px 20px}.confirmation-buttons button:first-child{background-color:#dc3545;color:#fff}.confirmation-buttons button:last-child{background-color:#6c757d;color:#fff}.friendly-name-label{align-items:center;background-color:#f0f0f0;border-radius:20px;box-shadow:0 2px 4px #0000001a;display:inline-flex;font-size:1.1rem;height:34px;line-height:1;margin:4px;padding:6px 16px;transition:all .3s ease}.friendly-name-label:hover{box-shadow:0 4px 8px #00000026;transform:translateY(-1px)}.friendly-name-label.empty{background-color:#f8f9fa;border:1px dashed #dee2e6}.label-text{color:#2c3e50;font-weight:600;margin-right:10px}.label-text,.pi-name{align-items:center;display:inline-flex}.pi-name{background-color:#0000000d;border-radius:12px;color:#6c757d;font-size:.9em;padding:4px 10px}.friendly-name-label.empty .label-text{color:#6c757d;font-style:italic}:root{--primary-color:#3b82f6;--secondary-color:#10b981;--accent-color:#f59e0b;--background-color:#f3f4f6;--card-background-color:#fff;--text-color:#374151;--text-light-color:#6b7280;--border-color:#e5e7eb;--button-text-color:#fff;--button-hover-bg:#2563eb;--button-active-bg:#1d4ed8;--chart-line-activity:var(--primary-color);--chart-line-lying:#ef4444;--chart-line-standing:#f59e0b;--chart-line-walking:#10b981;--chart-grid-color:#0000000d}body{background-color:#f3f4f6;background-color:var(--background-color);color:#374151;color:var(--text-color)}.container{grid-gap:2rem;display:grid;gap:2rem;grid-template-columns:320px 1fr;max-width:1600px;padding:1.5rem}@media (max-width:1024px){.container{grid-template-columns:1fr}}.card{background-color:#fff;background-color:var(--card-background-color);border-radius:.75rem;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;margin-bottom:1.5rem;padding:1.5rem}.details{display:flex;flex-direction:column;gap:1.5rem}.details-header{align-items:baseline;border-bottom:1px solid #e5e7eb;border-bottom:1px solid var(--border-color);display:flex;flex-direction:row;gap:1rem;margin-bottom:1rem;padding-bottom:1rem}.details-header h2{color:#374151;color:var(--text-color);font-size:1.5rem;font-weight:600;margin:0}.label-container{align-items:center;display:flex;gap:.5rem}.details-header .friendly-name-label{align-items:center;border-radius:9999px;cursor:default;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem;padding:.25rem .75rem}.details-header .friendly-name-label.no-name{background-color:#fef3c7;border:1px solid #fde68a;color:#92400e}.details-header .friendly-name-label.has-name{background-color:#dbeafe;border:1px solid #bfdbfe;color:#1e40af}.details-info p,.details-info small{color:#6b7280;color:var(--text-light-color);font-size:.875rem;margin:.25rem 0}.details-info p strong{color:#374151;color:var(--text-color);font-weight:500}.photo-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem;width:100%}.photo-header h3{color:#374151;color:var(--text-color);font-size:1.125rem;font-weight:600;margin:0}.latest-photo{background-color:#f3f4f6;background-color:var(--background-color);border-radius:.5rem;overflow:hidden;padding-top:100%;position:relative;width:100%}.latest-photo .no-photo,.latest-photo img,.photo-loading{height:100%;left:0;object-fit:cover;object-position:center;position:absolute;top:0;width:100%}.photo-timestamp{color:#6b7280;color:var(--text-light-color);font-size:.75rem;margin-top:.75rem;text-align:center}.photo-loading{align-items:center;display:flex;justify-content:center}.no-photo{color:#6b7280;color:var(--text-light-color);font-size:.875rem;padding:1rem;text-align:center}.drinking-behavior-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem}.drinking-behavior-header h3{color:#374151;color:var(--text-color);font-size:1.125rem;font-weight:600;margin:0}.drinking-behavior-header small{color:#6b7280;color:var(--text-light-color);font-size:.75rem}.drinking-chart-wrapper{height:250px;position:relative}.graph-container{background-color:initial;border-radius:0;box-shadow:none;gap:1.5rem;min-height:auto;padding:0}.graph-container,.graph-wrapper{display:flex;flex-direction:column}.graph-wrapper{margin-bottom:0;min-height:450px}.graph-header{align-items:center;border-bottom:1px solid #e5e7eb;border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;margin-bottom:1.5rem;padding-bottom:1rem}.graph-title{color:#374151;color:var(--text-color);font-size:1.25rem;font-weight:600;margin:0}.graph{flex-grow:1;min-height:300px;position:relative}.graph canvas{height:100%!important;left:0;position:absolute;top:0;width:100%!important}.graph-controls{display:flex;margin-top:1.5rem}.button,.graph-controls,button{gap:.5rem;justify-content:center}.button,button{align-items:center;background-color:#3b82f6;background-color:var(--primary-color);border:none;border-radius:.375rem;color:#fff;color:var(--button-text-color);cursor:pointer;display:inline-flex;font-size:.875rem;font-weight:500;padding:.5rem 1rem;text-decoration:none;transition:background-color .2s ease-in-out,box-shadow .2s ease-in-out}.button:hover,button:hover{background-color:#2563eb;background-color:var(--button-hover-bg);box-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f}.button:active,button:active{background-color:#1d4ed8;background-color:var(--button-active-bg)}.button:disabled,button:disabled{background-color:#6b7280;background-color:var(--text-light-color);cursor:not-allowed;opacity:.6}.graph-controls button{background-color:#e5e7eb;color:#374151;color:var(--text-color)}.graph-controls button:hover{background-color:#d1d5db;box-shadow:none;color:#374151;color:var(--text-color)}.graph-controls button.active{background-color:#3b82f6;background-color:var(--primary-color);color:#fff;color:var(--button-text-color);font-weight:600}.refresh-button{background-color:#10b981;background-color:var(--secondary-color);color:var(--button-text-color)}.refresh-button:hover{background-color:#059669}.refresh-button:active{background-color:#047857}.download-button{background-color:initial;border:1px solid #e5e7eb;border:1px solid var(--border-color);color:#6b7280;color:var(--text-light-color);min-width:auto;padding:.375rem}.download-button img{filter:grayscale(50%);height:1rem;width:1rem}.download-button:hover{background-color:#f3f4f6;background-color:var(--background-color);border-color:#6b7280;border-color:var(--text-light-color);color:#374151;color:var(--text-color)}.download-button:hover img{filter:grayscale(0)}.download-dropdown{display:inline-block;position:relative}.dropdown-menu{background-color:#fff;background-color:var(--card-background-color);border-radius:.375rem;box-shadow:0 8px 16px 0 #0003;display:none;margin-top:.25rem;min-width:180px;overflow:hidden;position:absolute;right:0;top:100%;z-index:10}.download-dropdown.show .dropdown-menu{display:block}.dropdown-menu button{background-color:initial;border:none;border-bottom:1px solid #e5e7eb;border-bottom:1px solid var(--border-color);border-radius:0;color:#374151;color:var(--text-color);display:block;padding:.75rem 1rem;text-align:left;text-decoration:none;width:100%}.dropdown-menu button:last-child{border-bottom:none}.dropdown-menu button:hover{background-color:#f3f4f6;background-color:var(--background-color);color:#3b82f6;color:var(--primary-color)}.graph-loading,.loading-container,.photo-loading{color:#6b7280;color:var(--text-light-color);min-height:200px}.graph-error,.graph-loading,.loading-container,.photo-loading{align-items:center;display:flex;flex-direction:column;justify-content:center}.graph-error{background-color:#fef2f2;border:1px solid #f87171;border-radius:.5rem;color:#dc2626;padding:2rem;text-align:center}.graph-error p{font-weight:500;margin:0}.last-updated-info{border-top:1px solid #e5e7eb;border-top:1px solid var(--border-color);color:#6b7280;color:var(--text-light-color);font-size:.875rem;margin-top:1.5rem;padding-top:1rem;text-align:center}@media (max-width:768px){.container{gap:1rem}.card,.container,.graph-wrapper{padding:1rem}.details-header{flex-wrap:wrap;gap:.5rem}.details-header h2,.graph-title{font-size:1.25rem}.drinking-behavior-header h3,.photo-header h3{font-size:1rem}.graph-controls{flex-wrap:wrap;justify-content:center}.download-dropdown{position:static}.dropdown-menu{left:50%;transform:translateX(-50%);width:90%}}@media (max-width:480px){.details-header .friendly-name-label{font-size:.75rem;padding:.15rem .5rem}.button,button{font-size:.8rem;padding:.4rem .8rem}.graph-controls{gap:.25rem}}.badge{border-radius:.5em;font-size:.9em;font-weight:700;padding:.35em .65em;text-shadow:1px 1px 1px #0000001a}.badge-red{background-color:#c82333;color:#fff}.badge-yellow{background-color:#e0a800;color:#000}.badge-green{background-color:#218838;color:#fff}.app-container{display:flex;flex-direction:column}.routes-container{flex-grow:1;margin-left:200px;padding-top:20px;transition:margin-left .3s ease}.login-page{margin-left:0!important}@media screen and (max-width:480px){.routes-container{margin-left:0;padding:70px 10px 10px}.app-container{flex-direction:column}}@media screen and (min-width:481px) and (max-width:768px){.routes-container{margin-left:100px;padding:20px 15px 15px}}@media screen and (min-width:769px) and (max-width:1024px){.routes-container{margin-left:150px;padding:20px}}@media screen and (min-width:1025px){.routes-container{margin-left:200px;padding:20px}}@media screen and (min-width:768px) and (max-width:1024px) and (orientation:portrait){.routes-container{margin-left:80px;padding:15px}}.container{margin:0 auto;max-width:1200px;padding:20px}.settings-form{background-color:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;padding:24px}.section-header,.settings-form{margin-bottom:24px}.section-header h2{color:#2c3e50;font-size:1.5rem;margin-bottom:8px}.section-description{color:#6c757d;font-size:.95rem;line-height:1.5;margin-bottom:16px}.field-description{color:#6c757d;font-size:.85rem;margin-bottom:8px;margin-top:4px}.friendly-name-container,.surgery-date-container{margin-bottom:32px}label{color:#2c3e50;font-weight:600;margin-bottom:8px}input,select{border:1px solid #ced4da;border-radius:4px;font-size:1rem;margin-bottom:16px;padding:8px 12px;width:100%}input:disabled,select:disabled{background-color:#f8f9fa;cursor:not-allowed}button{background-color:#007bff;border:none;border-radius:4px;color:#fff;cursor:pointer;font-weight:600;padding:8px 16px;transition:background-color .3s ease}button:disabled{background-color:#6c757d;cursor:not-allowed}button.enabled:hover{background-color:#0056b3}.table-container{background-color:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;padding:24px}table{border-collapse:collapse;margin-bottom:24px;width:100%}td,th{border-bottom:1px solid #dee2e6;padding:12px;text-align:left}th{background-color:#f8f9fa;color:#2c3e50;font-weight:600}.delete-button{background-color:initial;border:none;cursor:pointer;padding:4px}.delete-button img{height:20px;opacity:.6;transition:opacity .3s ease;width:20px}.delete-button:hover img{opacity:1}.delete-all-button{background-color:#dc3545;margin-bottom:24px}.delete-all-button:hover{background-color:#c82333}.confirmation-overlay{align-items:center;background-color:#00000080;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1000}.confirmation-dialog{background-color:#fff;border-radius:8px;box-shadow:0 4px 6px #0000001a;max-width:400px;padding:24px;width:100%}.confirmation-content{text-align:center}.confirmation-buttons{display:flex;gap:16px;justify-content:center;margin-top:16px}.confirmation-buttons button{min-width:80px}@media (max-width:768px){.container{flex-direction:column;padding-top:70px}.settings-form{order:1}.table-container{margin-top:20px;order:2}}@media (max-width:480px){.container{padding-top:90px}.table-container{padding:15px}td,th{font-size:14px;padding:6px}.delete-all-button{margin-top:15px;width:100%}}@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){.container{gap:20px;padding:20px 15px 15px}.table-container{padding:15px}td,th{font-size:14px;padding:6px}}.login-container{align-items:center;background-color:#f0f0f0;display:flex;height:100vh;justify-content:center}.login-form{background-color:#fff;border-radius:10px;box-shadow:0 4px 8px #0000001a;max-width:400px;padding:30px;text-align:center;width:100%}@media (max-width:480px){.login-form{margin:0 auto;padding:20px;width:90%}.logo{height:80px!important;width:80px!important}}.logo{height:120px;width:120px}.logo,h2{margin-bottom:20px}h2{color:#333}.form-group{margin-bottom:15px;text-align:left}label{color:#555;display:block;font-weight:700;margin-bottom:5px}input{border:1px solid #ddd;border-radius:5px;padding:10px}.login-button,input{font-size:16px;width:100%}.login-button{background-color:#4caf50;border:none;border-radius:5px;color:#fff;cursor:pointer;margin-top:10px;padding:12px}.login-button:hover{background-color:#45a049}.error-message{color:#f44336;margin-bottom:15px}.home-container{display:flex;flex-direction:column;padding:20px}.welcome-message{margin-bottom:20px}.pen-grid-container{background-color:#fff;border-radius:5px;box-shadow:0 4px 6px #0000001a;padding:10px}.overview-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:15px;padding:0 10px}.refresh-button{background-color:#4caf50;border:none;border-radius:4px;color:#fff;cursor:pointer;font-size:14px;padding:8px 16px;transition:background-color .3s}.refresh-button:hover{background-color:#45a049}.refresh-button:disabled{background-color:#ccc;cursor:not-allowed}.pen-grid{border:1px solid #ccc;display:flex;gap:20px;padding:20px}@media (max-width:480px){.home-container,.pen-grid{padding:10px}.pen-grid{flex-direction:column;gap:10px}.alley,.pen-column{width:100%}.alley{height:20px}.pen-image{height:150px}.overview-header{align-items:flex-start;flex-direction:column;gap:10px}.refresh-button{width:100%}}@media (min-width:481px) and (max-width:768px){.pen-grid{flex-wrap:wrap}.pen-column{flex-basis:calc(50% - 20px);flex-grow:0;flex-shrink:0}.alley{display:none}}.pen-column{display:flex;flex:1 1;flex-direction:column;gap:20px}.pen{border:1px solid #ccc;flex-direction:column;height:100%;padding:10px;position:relative;text-align:center}.pen,.pen-image{align-items:center;display:flex;justify-content:center}.pen-image{background-color:#f5f5f5;border-radius:5px;height:200px;margin-bottom:10px;object-fit:cover;width:100%}.pen img{max-height:100%;max-width:100%;object-fit:cover}.no-photo{align-items:center;border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center}.alley,.no-photo{background-color:#f5f5f5}.alley{border:1px solid #ccc;width:20px}@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){.home-container{padding:20px 15px 15px}.pen-grid{gap:15px;padding:15px}.pen-column{flex-basis:calc(50% - 15px);flex-grow:0;flex-shrink:0}.pen-image{height:180px}}