/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
  }
  
  body {
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
  }
  
  /* Header Styles */
  header {
    background-color: #8C6A7F;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    gap: 10px;
  }
  
  .logo img {
    width: 24px;
    height: 24px;
  }
  
  .profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    transition: transform 0.2s;
  }
  
  .profile-img:hover {
    transform: scale(1.05);
  }
  
  .dropdown {
    position: relative;
    display: inline-block;
  }
  
  .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
  }
  
  .dropdown:hover .dropdown-content {
    display: block;
  }
  
  .dropdown-content a {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
  }
  
  .dropdown-content a:hover {
    background-color: #e9e9e9;
  }
  
  /* Main Content Styles */
  main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .head_container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    justify-content: space-between;
  }
  
  .back-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #8C6A7F;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.2s;
  }
  
  .back-button:hover {
    background-color: #7a5a6d;
  }
  
  h1 {
    color: #333;
    font-size: 24px;
  }
  
  /* Desktop Table Styles */
  .table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
  }
  
  .desktop-view {
    display: block;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
  }
  
  th {
    background-color: #8C6A7F;
    color: white;
    font-weight: 500;
  }
  
  tr:hover {
    background-color: #f9f9f9;
  }
  
  .pet-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .pet-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
  }
  
  .pet-name {
    font-weight: bold;
    margin-bottom: 3px;
  }
  
  .pet-breed {
    font-size: 13px;
    color: #666;
  }
  
  .qr-code {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .qr-code:hover {
    transform: scale(1.1);
  }
  
  .actions {
    display: flex;
    gap: 8px;
  }
  
  button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
  }
  
  .view-btn {
    background-color: #8C6A7F;
    color: white;
  }
  
  .view-btn:hover {
    background-color: #7a5a6d;
  }
  
  .delete-btn {
    background-color: #f44336;
    color: white;
  }
  
  .delete-btn:hover {
    background-color: #d32f2f;
  }
  
  /* Mobile Card Styles */
  .mobile-view {
    display: none;
  }
  
  .pet-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
  }
  
  .pet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .pet-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }
  
  .pet-number {
    background: #8C6A7F;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
  }
  
  .pet-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
  }
  
  /* Modal Styles */
  .modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
  }
  
  .modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s;
  }
  
  @keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
  }
  
  .modal-content h2 {
    color: #8C6A7F;
    margin-bottom: 20px;
    font-size: 22px;
  }
  
  .modal-body p {
    margin: 15px 0;
  }
  
  .status-dropdown {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%;
    margin-top: 5px;
  }
  
  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
  }
  
  .btn-primary {
    background-color: #8C6A7F;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .btn-primary:hover {
    background-color: #7a5a6d;
  }
  
  .btn-cancel {
    background-color: transparent;
    color: #8C6A7F;
    padding: 10px 20px;
    border: 1px solid #8C6A7F;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .btn-cancel:hover {
    background-color: #f5f0f3;
  }
  
  .large-qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    display: block;
  }
  
  .qr-instructions {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  /* Responsive Breakpoints */
  @media (max-width: 768px) {
    .desktop-view {
      display: none;
    }
    
    .mobile-view {
      display: block;
    }
    
    .logo span {
      display: none;
    }
    
    h1 {
      font-size: 20px;
    }
    
    .pet-card {
      padding: 12px;
    }
  }
  
  @media (max-width: 480px) {
    header {
      padding: 10px 15px;
    }
    
    .head_container {
      margin-bottom: 20px;
    }
    
    .back-button {
      padding: 6px 12px;
      font-size: 13px;
    }
    
    .pet-info {
      gap: 10px;
    }
    
    .pet-img {
      width: 36px;
      height: 36px;
    }
    
    .pet-name {
      font-size: 15px;
    }
    
    .pet-breed {
      font-size: 12px;
    }
    
    .modal-content {
      padding: 20px;
    }
  }

  /* Add these new styles to your existing CSS */

/* Add Pet Button */
.add-pet-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
  }
  
  .add-pet-btn:hover {
    background-color: #45a049;
  }
  
  /* Pet Form Styles */
  .pet-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .form-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
  }
  
  .form-group input,
  .form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
  }
  
  .form-group input:focus,
  .form-group select:focus {
    outline: none;
    border-color: #8C6A7F;
    box-shadow: 0 0 0 2px rgba(140, 106, 127, 0.2);
  }
  
  /* Responsive adjustments for Add Pet button */
  @media (max-width: 768px) {
    .head_container {
      flex-wrap: wrap;
    }
    
    .add-pet-btn {
      order: 3;
      width: 100%;
      margin-top: 10px;
    }
  }
  
  /* Modal form specific styles */
  #addPetModal .modal-content {
    max-width: 500px;
  }
  
  #addPetModal .modal-body {
    padding: 0;
  }
  
  /* Input placeholder styling */
  input::placeholder {
    color: #aaa;
    font-size: 13px;
  }

  /* Add these new styles to your existing CSS */

/* Devices Button */
.devices-btn {
    background-color: #2196F3;
    color: white;
  }
  
  .devices-btn:hover {
    background-color: #0b7dda;
  }
  
  /* Danger Button */
  .btn-danger {
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .btn-danger:hover {
    background-color: #d32f2f;
  }
  
  /* Devices Modal Styles */
  .devices-list {
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 5px;
  }
  
  .device-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
  }
  
  .device-item:last-child {
    border-bottom: none;
  }
  
  .device-item input[type="checkbox"] {
    margin-right: 10px;
  }
  
  /* Adjust modal actions for devices modal */
  #devicesModal .modal-actions {
    display: flex;
    justify-content: space-between;
  }
  
  #devicesModal .modal-actions button {
    flex: 1;
    margin: 0 5px;
  }
  
  /* Pet Details Modal - Devices row */
  #petDevices {
    word-break: break-all;
  }