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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  min-height: 100vh;
  color: #e8e8e8;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 26px;
}

.card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='url'] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}

input:focus {
  border-color: #4fc3f7;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:hover {
  opacity: 0.85;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #0288d1;
  width: 100%;
}

.btn-edit {
  background: #f9a825;
}

.btn-delete {
  background: #d32f2f;
}

.btn-link {
  background: transparent;
  border: 1px solid #4fc3f7;
  color: #4fc3f7;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 14px;
}

.msg {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.msg.error {
  display: block;
  background: rgba(211, 47, 47, 0.2);
  border: 1px solid #d32f2f;
  color: #ff8a80;
}

.msg.success {
  display: block;
  background: rgba(46, 125, 50, 0.2);
  border: 1px solid #2e7d32;
  color: #a5d6a7;
}

.msg.info {
  display: block;
  background: rgba(2, 136, 209, 0.2);
  border: 1px solid #0288d1;
  color: #81d4fa;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 14px 24px;
  border-radius: 12px;
  margin-bottom: 26px;
}

.navbar .brand {
  font-size: 18px;
  font-weight: 700;
  color: #4fc3f7;
  text-decoration: none;
}

.navbar .links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.navbar .links a {
  color: #e8e8e8;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.navbar .links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.navbar .links a.active {
  background: rgba(79, 195, 247, 0.25);
  color: #4fc3f7;
}

.navbar .nav-api {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e8e8e8;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.navbar .nav-api:hover {
  background: rgba(79, 195, 247, 0.2);
  color: #4fc3f7;
}

.navbar .logout {
  background: none;
  border: 1px solid #d32f2f;
  color: #ff8a80;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.navbar .logout:hover {
  background: rgba(211, 47, 47, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  vertical-align: middle;
}

th {
  background: rgba(255, 255, 255, 0.1);
  color: #4fc3f7;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.app-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-name {
  font-weight: 600;
}

.app-link {
  color: #4fc3f7;
  text-decoration: none;
  word-break: break-all;
}

.app-link:hover {
  text-decoration: underline;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  margin-right: 6px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #1d2b36;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 28px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
}

.modal h2 {
  margin-bottom: 18px;
  font-size: 19px;
  color: #4fc3f7;
}

.modal .form-group {
  margin-bottom: 14px;
}

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

.btn-close {
  background: #546e7a;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 16px;
  color: #90a4ae;
}

.empty {
  text-align: center;
  padding: 40px;
  color: #90a4ae;
}

.err-code {
  font-size: 72px;
  font-weight: 800;
  color: #4fc3f7;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(79, 195, 247, 0.4);
}

.err-text {
  color: #90a4ae;
  margin-top: 10px;
  font-size: 15px;
}
