/* Account page styles — matches the coldfiles dark theme */
body {
  min-height: 100vh;
  background: #1a1a1a;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 16px;
}

.account-container {
  max-width: 520px;
  margin: 60px auto;
  padding: 0 16px;
}

/* ======== Auth Section ======== */
.auth-section {
  background: #2a2a2a;
  border: 3px solid #fff;
  padding: 32px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #fff;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: #1a1a1a;
  color: #888;
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s;
}

.auth-tab.active {
  background: #2a2a2a;
  color: #fff;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

.auth-tab:hover {
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.auth-form h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
  text-align: center;
}

.auth-form input {
  padding: 12px;
  border: 2px solid #fff;
  background: #1a1a1a;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  box-sizing: border-box;
  width: 100%;
}

.auth-form input:focus {
  outline: none;
  border-color: #ccc;
}

.auth-btn {
  padding: 12px;
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.auth-btn:hover {
  background: #ccc;
}

.forgot-link {
  display: block;
  text-align: center;
  color: #888;
  font-size: 13px;
  text-decoration: none;
  margin-top: 4px;
}
.forgot-link:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-error {
  color: #ff6b6b;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.auth-form .tos-checkbox {
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
}

.auth-form .tos-checkbox input {
  width: auto !important;
  margin: 0;
  flex-shrink: 0;
}

.auth-form .tos-checkbox a {
  color: #fff;
  text-decoration: underline;
}

.auth-success {
  color: #51cf66;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.twofa-info {
  text-align: center;
  font-size: 14px;
  color: #ccc;
  margin: 0;
}

/* ======== Dashboard ======== */
.dashboard-section {
  text-align: left;
}

.sub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #fff;
}

.sub-tab {
  flex: 1;
  padding: 10px;
  background: #1a1a1a;
  color: #888;
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s;
}

.sub-tab.active {
  background: #2a2a2a;
  color: #fff;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

.sub-tab:hover {
  color: #fff;
}

.panel {
  display: block;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 3px solid #fff;
  padding-bottom: 12px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 28px;
}

.logout-btn {
  padding: 8px 20px;
  background: #2a2a2a;
  color: #fff;
  border: 2px solid #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #3a3a3a;
}

.card {
  background: #2a2a2a;
  border: 2px solid #fff;
  padding: 20px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.info-label {
  color: #aaa;
  font-weight: bold;
}

/* ======== 2FA ======== */
.twofa-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.badge {
  padding: 2px 10px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #fff;
}

.badge-on {
  background: #2b8a3e;
  color: #fff;
  border-color: #2b8a3e;
}

.badge-off {
  background: #1a1a1a;
  color: #888;
}

.small-btn {
  padding: 4px 14px;
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.small-btn:hover {
  background: #ccc;
}

.danger-btn {
  background: #c92a2a;
  color: #fff;
  border-color: #c92a2a;
}

.danger-btn:hover {
  background: #e03131;
}

.twofa-setup-area {
  margin-top: 12px;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid #444;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.twofa-setup-area p {
  margin: 0;
  font-size: 13px;
  color: #ccc;
  text-align: center;
}

.twofa-setup-area input {
  padding: 8px;
  border: 2px solid #fff;
  background: #1a1a1a;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  width: 140px;
  text-align: center;
  box-sizing: border-box;
}

.twofa-setup-area input:focus {
  outline: none;
  border-color: #ccc;
}

#totpQrContainer {
  text-align: center;
}

#totpQrContainer canvas {
  border: 2px solid #fff;
}

.secret-key {
  font-family: monospace;
  font-size: 14px;
  background: #111;
  border: 1px solid #444;
  padding: 10px;
  text-align: center;
  color: #51cf66;
  letter-spacing: 2px;
  user-select: all;
  max-width: 100%;
  overflow-wrap: break-word;
  width: 100%;
  box-sizing: border-box;
}

.password-change-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.password-change-form input {
  padding: 10px;
  border: 2px solid #fff;
  background: #1a1a1a;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
}

.password-change-form input:focus {
  outline: none;
  border-color: #ccc;
}

.api-key-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.api-key-form input {
  flex: 1;
  padding: 8px;
  border: 2px solid #fff;
  background: #1a1a1a;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  box-sizing: border-box;
}

.api-key-form input:focus {
  outline: none;
  border-color: #ccc;
}

.api-key-list {
  max-height: 200px;
  overflow-y: auto;
}

.api-key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #444;
  font-size: 12px;
}

.api-key-item:last-child {
  border-bottom: none;
}

.api-key-item .key-meta {
  color: #888;
}

.api-key-new {
  margin-top: 10px;
  padding: 10px;
  background: #1a1a1a;
  border: 1px solid #444;
  text-align: center;
}

/* ======== Files List ======== */
.files-list {
  max-height: 360px;
  overflow-y: auto;
}

.loading-text {
  text-align: center;
  color: #888;
  font-size: 14px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #444;
  font-size: 13px;
  gap: 8px;
}

.file-item:last-child {
  border-bottom: none;
}

.file-info {
  flex: 1;
  min-width: 0;
}

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

.file-meta {
  color: #888;
  font-size: 11px;
  margin-top: 2px;
}

.file-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.file-link-btn {
  padding: 4px 10px;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.file-link-btn:hover {
  background: #3a3a3a;
}

.file-delete-btn {
  padding: 4px 10px;
  background: #c92a2a;
  color: #fff;
  border: 1px solid #c92a2a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.file-delete-btn:hover {
  background: #e03131;
}

.no-files {
  text-align: center;
  color: #888;
  font-size: 14px;
  padding: 20px 0;
}

/* ======== Bottom Bar ======== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-top: 3px solid #fff;
  padding: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 100;
}

.bottom-bar a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.bottom-bar a:hover {
  text-decoration: underline;
  color: #ccc;
}

/* ======== Responsive ======== */
@media (max-width: 520px) {
  .account-container {
    margin: 30px auto;
  }
  .dashboard-header h1 {
    font-size: 22px;
  }
  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .file-actions {
    margin-top: 6px;
  }
}