/* Kentronics Device Manager - Modern Professional Styles */

/* Reset and Base Styles */
.kts-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.kts-page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.kts-page-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Two Column Layout */
.kts-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.kts-left-column,
.kts-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Compact Form Styles */
.kts-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.kts-form h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
    position: relative;
}

.kts-form h3:first-child {
    margin-top: 0;
}

.kts-form h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

/* Compact Form Fields */
.kts-form-group {
    margin-bottom: 15px;
    position: relative;
}

.kts-form label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kts-form input,
.kts-form select,
.kts-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
    box-sizing: border-box;
}

.kts-form input:focus,
.kts-form select:focus,
.kts-form textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.kts-form input:hover,
.kts-form select:hover,
.kts-form textarea:hover {
    border-color: #bdc3c7;
    background: #ffffff;
}

/* Compact Button Styles */
.kts-form button,
.kts-form input[type="submit"],
.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    margin-top: 15px;
    width: 100%;
    max-width: 200px;
}

.kts-form button:hover,
.kts-form input[type="submit"]:hover,
.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.kts-form button:active,
.kts-form input[type="submit"]:active,
.button-primary:active {
    transform: translateY(-1px);
}

/* Compact Search Form Styles */
.kts-search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e1e8ed;
}

.kts-search-form input[type="text"] {
    max-width: 300px;
    margin-right: 10px;
}

.kts-search-form input[type="submit"] {
    max-width: 100px;
    width: auto;
    margin-top: 0;
}

/* Compact Table Styles */
.kts-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.kts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.kts-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kts-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.8rem;
}

.kts-table td {
    padding: 10px;
    border-bottom: 1px solid #e1e8ed;
    color: #2c3e50;
}

.kts-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.005);
    transition: all 0.2s ease;
}

.kts-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Indicators */
.kts-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kts-status.active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kts-status.inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Notice Styles */
.kts-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #1565c0;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.1);
    font-size: 0.9rem;
}

.kts-notice.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
    color: #2e7d32;
}

.kts-notice.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #c62828;
}

/* Response Container */
#kts-registration-response {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
}

/* Master Registry Specific Styles */
.kts-master-registry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.kts-master-registry .kts-form {
    margin: 0;
}

.kts-device-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    margin-top: 15px;
    font-size: 0.9rem;
}

.kts-device-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kts-device-details li {
    padding: 6px 0;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kts-device-details li:last-child {
    border-bottom: none;
}

.kts-device-details strong {
    color: #667eea;
    font-weight: 600;
}

/* Admin Management Cards - Registry Style */
.kts-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px 18px;
  margin-bottom: 8px;
}
.kts-admin-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  border: 2px solid #e1e8ed;
  padding: 20px 18px 16px 18px;
  margin-bottom: 0;
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.18s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 210px;
}
.kts-admin-card:hover {
  box-shadow: 0 0 24px 0 rgba(102,126,234,0.25), 0 2px 10px rgba(102,126,234,0.10);
  border-color: #764ba2;
  z-index: 2;
  transform: translateY(-2px) scale(1.012);
}
.kts-admin-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
  font-size: 1.13rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #667eea;
  position: relative;
  letter-spacing: 0.2px;
  background: none;
  width: 100%;
}
.kts-admin-heading .kts-card-icon {
  font-size: 1.2em;
  margin-right: 2px;
  display: inline-block;
}
.kts-admin-heading::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 1px;
}
.kts-admin-label {
  font-weight: 600;
  color: #444;
  margin-right: 4px;
}
.kts-admin-meta {
  margin-bottom: 4px;
  font-size: 1.01rem;
  color: #444;
}
.kts-admin-actions {
  margin-top: 12px;
  width: 100%;
  display: flex;
  gap: 10px;
}
.kts-back-btn {
  background: linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1.01rem;
  padding: 8px 22px;
  border-radius: 7px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(102,126,234,0.10);
  border: 2px solid #e1e8ed;
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.kts-back-btn:hover {
  background: linear-gradient(135deg,#764ba2 0%,#667eea 100%);
  border-color: #764ba2;
  box-shadow: 0 0 0 4px rgba(118,75,162,0.13), 0 2px 8px rgba(102,126,234,0.13);
}
.kts-logout-btn {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #e1e8ed;
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
  box-shadow: 0 2px 8px rgba(192,57,43,0.10);
}
.kts-logout-btn:hover {
  background: #a93226;
  border-color: #764ba2;
  box-shadow: 0 0 0 4px rgba(118,75,162,0.13), 0 2px 8px rgba(192,57,43,0.13);
}
.kts-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.01rem;
    padding: 8px 22px;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s, color 0.2s;
    outline: none;
    display: inline-block;
}
.kts-btn:hover, .kts-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    border-color: #764ba2;
    box-shadow: 0 0 0 4px rgba(118,75,162,0.13), 0 2px 8px rgba(102,126,234,0.13);
    z-index: 2;
    text-decoration: none;
}
.kts-dashboard-card {
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
  border: 2px solid #e1e8ed;
}
.kts-dashboard-card:hover {
  box-shadow: 0 0 0 4px rgba(118,75,162,0.13), 0 2px 8px rgba(102,126,234,0.13);
  border-color: #764ba2;
  z-index: 2;
}
@media (max-width: 600px) {
  .kts-admin-grid {
    grid-template-columns: 1fr;
    gap: 14px 0;
  }
  .kts-admin-card {
    min-width: 0;
    padding: 14px 6px 10px 6px;
  }
  .kts-admin-heading {
    font-size: 1rem;
    padding-bottom: 4px;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .kts-two-column {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .kts-master-registry {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .kts-container {
        padding: 15px;
    }
    
    .kts-form {
        padding: 20px;
        margin: 15px auto;
    }
    
    .kts-page-header h2 {
        font-size: 1.5rem;
    }
    
    .kts-search-form input[type="text"] {
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .kts-search-form input[type="submit"] {
        max-width: 100%;
    }
    
    .kts-table {
        font-size: 11px;
    }
    
    .kts-table th,
    .kts-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .kts-form {
        padding: 15px;
    }
    
    .kts-page-header {
        padding: 15px 0;
    }
    
    .kts-page-header h2 {
        font-size: 1.3rem;
    }
}

/* Loading States */
.kts-loading {
    opacity: 0.6;
    pointer-events: none;
}

.kts-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: kts-spin 1s linear infinite;
}

@keyframes kts-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
.kts-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.kts-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.kts-table-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.kts-table-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}
