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

body {
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-size: 11px;
  background: #3a6ea5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath d='M0 0h2v2H0zm2 2h2v2H2z' fill='%232a5a95'/%3E%3C/svg%3E");
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

.window {
  background: #ece9d8;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 2px 2px 0 #000;
  width: 420px;
  max-width: 95vw;
}

.titlebar {
  background: linear-gradient(to right, #0a246a, #a6caf0);
  color: #fff;
  padding: 3px 4px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.titlebar .buttons {
  display: flex;
  gap: 2px;
}

.titlebar button {
  width: 16px;
  height: 14px;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
  font-size: 9px;
  line-height: 10px;
  padding: 0;
  cursor: pointer;
}

.content {
  padding: 12px;
}

label {
  display: block;
  margin-bottom: 2px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 3px 4px;
  border: 2px solid;
  border-color: #404040 #fff #fff #404040;
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  margin-bottom: 10px;
}

.btn {
  padding: 3px 16px;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.btn:active {
  border-color: #404040 #fff #fff #404040;
}

.btn-primary {
  background: #ece9d8;
}

.error {
  color: #c00;
  margin-bottom: 8px;
}

/* App window bigger */
.window.app {
  width: 720px;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.file-list {
  background: #fff;
  border: 2px solid;
  border-color: #404040 #fff #fff #404040;
  height: 360px;
  overflow-y: auto;
  padding: 4px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-bottom: 1px solid #ddd;
}

.file-item:hover {
  background: #316ac5;
  color: #fff;
}

.file-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid #808080;
}

.file-item .info {
  flex: 1;
  overflow: hidden;
}

.file-item .name {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item .url {
  font-size: 10px;
  color: #666;
  word-break: break-all;
}

.file-item:hover .url { color: #cce; }

.file-item .actions {
  display: flex;
  gap: 4px;
}

.file-item .actions button {
  padding: 1px 6px;
  font-size: 10px;
}

.status {
  margin-top: 8px;
  padding: 4px;
  background: #fff;
  border: 1px solid #808080;
  font-size: 10px;
}