* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: 280px;
  background: #242424;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h1 {
  font-size: 20px;
  color: #fff;
}

.btn-icon {
  background: #333;
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.btn-icon:hover {
  background: #444;
}

.server-list {
  flex: 1;
  padding: 10px;
}

.server-group {
  margin-bottom: 20px;
}

.server-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #2a2a2a;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 5px;
}

.server-header:hover {
  background: #333;
}

.server-name {
  font-weight: 600;
  font-size: 14px;
}

.server-actions {
  display: flex;
  gap: 5px;
}

.server-actions button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

.server-actions button:hover {
  color: #fff;
}

.service-list {
  padding-left: 10px;
  display: none;
}

.service-list.expanded {
  display: block;
}

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  margin: 4px 0;
  background: #1a1a1a;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.service-item:hover {
  background: #333;
}

.service-item.active {
  background: #0066cc;
}

.service-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-icon {
  font-size: 16px;
}

.service-name {
  font-size: 13px;
}

.service-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.service-item:hover .service-actions {
  opacity: 1;
}

.service-actions button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

.service-actions button:hover {
  color: #fff;
}

/* === Main Content === */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.welcome h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.welcome p {
  font-size: 16px;
  color: #888;
  margin-bottom: 8px;
}

.welcome .hint {
  font-size: 14px;
  color: #666;
  margin-top: 20px;
}

.service-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.blocked-warning {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.blocked-warning p {
  font-size: 18px;
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

/* === Buttons === */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #0066cc;
  color: #fff;
}

.btn-primary:hover {
  background: #0052a3;
}

.btn-secondary {
  background: #444;
  color: #fff;
}

.btn-secondary:hover {
  background: #555;
}

/* === Modals === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #2a2a2a;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
}

.modal-content h2 {
  margin-bottom: 20px;
  font-size: 22px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #ccc;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #1a1a1a;
  color: #e0e0e0;
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #0066cc;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .sidebar {
    width: 240px;
  }
}
