/* User Role Badge */
.user-role-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.8em;
  font-weight: bold;
  background: #444;
  color: #fff;
  vertical-align: middle;
}

.user-role-badge.admin {
  background: #c0392b;
  color: #fff;
}

.user-role-badge.user {
  background: #2980b9;
  color: #fff;
}

:root {
  --bg: radial-gradient(circle at 12% 18%, #1b3e2a 0, #111f17 40%, #0a110d 100%);
  --panel: #15241b;
  --panel-2: #1c2f23;
  --text: #e7f7ea;
  --muted: #9ec8a8;
  --accent: #49d17d;
  --danger: #ef8d56;
  --border: #2a4b36;
  --topbar-bg: rgba(20, 40, 20, 0.86);
  --topbar-border: #0f240f;
  --brand-text: #ffffff;
  --brand-shadow: #000;
  --menu-label-text: #d8ffd8;
  --menu-label-shadow: #000;
  --menu-btn-border: rgba(218, 255, 218, 0.7);
  --menu-btn-bg: linear-gradient(135deg, rgba(46, 139, 87, 0.35), rgba(23, 52, 33, 0.65));
  --menu-btn-hover-bg: linear-gradient(135deg, rgba(74, 160, 74, 0.5), rgba(32, 80, 48, 0.75));
  --menu-btn-text: #e8ffe8;
  --menu-btn-focus: #8af58a;
  --mobile-servers-btn-border: #d7dde4;
  --mobile-servers-btn-bg: #eef1f5;
  --mobile-servers-btn-text: #1f2c37;
  --mobile-drawer-handle: rgba(175, 190, 204, 0.35);
  --mobile-drawer-title: var(--text);
  --mobile-server-help-bg: linear-gradient(180deg, #1b3528 0%, #12251b 100%);
  --mobile-server-help-border: #2f5d48;
  --mobile-server-help-top-bg: rgba(57, 110, 81, 0.28);
  --mobile-server-help-top-border: rgba(113, 169, 141, 0.45);
  --mobile-server-help-item-bg: #2b4637;
  --mobile-server-help-item-hover: #355844;
  --mobile-server-help-item-text: #eef8f1;
  --mobile-help-handle: rgba(113, 169, 141, 0.55);
  --mobile-account-bg: linear-gradient(180deg, #1f2f27 0%, #182520 100%);
  --mobile-account-border: #2f5d48;
  --mobile-account-top-bg: rgba(72, 118, 95, 0.2);
  --mobile-account-top-border: rgba(113, 169, 141, 0.35);
  --mobile-account-item-bg: #2b3f35;
  --mobile-account-item-hover: #345143;
  --mobile-account-item-text: #eef8f1;
  --mobile-account-logout-bg: #533030;
  --mobile-account-logout-text: #ffeaea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  color: var(--text);
  background: linear-gradient(-45deg, #1e3c1e, #2e8b57, #3cb371, #145214);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  min-height: 100vh;
}

html[lang='ar'] body,
html[lang='ar'] button,
html[lang='ar'] input,
html[lang='ar'] select,
html[lang='ar'] textarea {
  font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif !important;
}

html[lang='ar'] body {
  font-size: 17px !important;
  line-height: 1.7 !important;
}

html[lang='ar'] .menu-center-label,
html[lang='ar'] .menu-links a,
html[lang='ar'] .menu-links button,
html[lang='ar'] .btn,
html[lang='ar'] .tab-btn,
html[lang='ar'] .auth-message,
html[lang='ar'] .auth-divider,
html[lang='ar'] .hint,
html[lang='ar'] .server-create-form label,
html[lang='ar'] .server-select-row label,
html[lang='ar'] .server-create-form input,
html[lang='ar'] .server-create-form select,
html[lang='ar'] .server-select-row select,
html[lang='ar'] .action-btn,
html[lang='ar'] .server-meta-copy-btn,
html[lang='ar'] .config-option,
html[lang='ar'] .config-option-input label,
html[lang='ar'] .config-option-output,
html[lang='ar'] .type-input input,
html[lang='ar'] .type-input textarea,
html[lang='ar'] .select,
html[lang='ar'] .select .option.current,
html[lang='ar'] .select-options .option,
html[lang='ar'] .account-setting .title,
html[lang='ar'] .language-input-selector,
html[lang='ar'] .language-select,
html[lang='ar'] .profile-toolbar-select label,
html[lang='ar'] .profile-toolbar-select select,
html[lang='ar'] .confirm-card,
html[lang='ar'] .confirm-card input[type='text'] {
  letter-spacing: 0;
}

html[lang='ar'] .home-content h1,
html[lang='ar'] .auth-card h1,
html[lang='ar'] .dashboard-main h1,
html[lang='ar'] .card h2,
html[lang='ar'] .card h3,
html[lang='ar'] .card h4 {
  font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif !important;
  letter-spacing: 0;
  line-height: 1.45;
}

html[lang='ar'] .auth-card h1 {
  font-size: 1.55rem !important;
}

html[lang='ar'] .auth-subtitle {
  font-size: 0.9rem !important;
  line-height: 1.9 !important;
}

html[lang='ar'] .auth-form input,
html[lang='ar'] .type-input input,
html[lang='ar'] .type-input textarea,
html[lang='ar'] .server-create-form input,
html[lang='ar'] .server-create-form select,
html[lang='ar'] .server-select-row select,
html[lang='ar'] .profile-toolbar-select select,
html[lang='ar'] .confirm-card input[type='text'] {
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

html[lang='ar'] .menu-links a,
html[lang='ar'] .menu-links button,
html[lang='ar'] .tab-btn,
html[lang='ar'] .btn,
html[lang='ar'] .action-btn,
html[lang='ar'] .language-input-selector,
html[lang='ar'] .server-meta-copy-btn {
  font-size: 0.82rem !important;
}

html[lang='ar'] .menu-center-label,
html[lang='ar'] .auth-divider,
html[lang='ar'] .auth-message,
html[lang='ar'] .hint,
html[lang='ar'] .server-create-form label,
html[lang='ar'] .server-select-row label,
html[lang='ar'] .profile-toolbar-select label,
html[lang='ar'] .config-option-output {
  font-size: 0.78rem !important;
  line-height: 1.8 !important;
}

html[lang='ar'] .config-option-input label {
  font-size: 0.96rem !important;
  line-height: 1.5 !important;
}

html[lang='ar'] .account-settings-grid,
html[lang='ar'] .account-setting .card-body {
  line-height: 1.8;
}

html[lang='ar'] .navigation-desktop {
  font-size: 17px;
}

html[lang='ar'] .navigation-server {
  padding: 14px;
}

html[lang='ar'] .navigation-server-name {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

html[lang='ar'] .navigation-server-detail {
  font-size: 0.76rem !important;
  line-height: 1.7 !important;
}

html[lang='ar'] .statusplayerbadge {
  font-size: 0.68rem !important;
  line-height: 1.4 !important;
  padding: 5px 8px;
}

html[lang='ar'] .navigation-list {
  gap: 10px;
}

html[lang='ar'] .navigation-list .item {
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  padding: 14px 16px;
  gap: 12px;
}

html[lang='ar'] .navigation-list .item i {
  font-size: 1.08rem !important;
  width: 22px;
}

html[lang='ar'] .navigation-item-label {
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}

html[lang='ar'] .navigation-darkmode-toggle,
html[lang='ar'] .navigation-toggle {
  font-size: 0.88rem !important;
  padding: 11px 14px;
}

body.light {
  --bg: radial-gradient(circle at 12% 18%, #d9f3e1 0, #b9dec7 44%, #9ccab0 100%);
  --panel: #f1fff5;
  --panel-2: #e7f6ec;
  --text: #113322;
  --muted: #3b7052;
  --accent: #1f9a57;
  --danger: #c15f2a;
  --border: #88b39a;
  --topbar-bg: rgba(221, 245, 228, 0.94);
  --topbar-border: #88b39a;
  --brand-text: #113322;
  --brand-shadow: transparent;
  --menu-label-text: #1c4c34;
  --menu-label-shadow: transparent;
  --menu-btn-border: #88b39a;
  --menu-btn-bg: linear-gradient(135deg, rgba(232, 248, 238, 0.95), rgba(204, 231, 214, 0.95));
  --menu-btn-hover-bg: linear-gradient(135deg, rgba(215, 240, 224, 0.96), rgba(188, 221, 202, 0.96));
  --menu-btn-text: #18462f;
  --menu-btn-focus: #2f8f5d;
  --mobile-servers-btn-border: #88b39a;
  --mobile-servers-btn-bg: #e8f6ed;
  --mobile-servers-btn-text: #1e4d35;
  --mobile-drawer-handle: rgba(81, 128, 99, 0.32);
  --mobile-server-help-bg: linear-gradient(180deg, #d7efe1 0%, #c8e4d5 100%);
  --mobile-server-help-border: #7aa98f;
  --mobile-server-help-top-bg: rgba(153, 195, 172, 0.28);
  --mobile-server-help-top-border: rgba(98, 150, 121, 0.46);
  --mobile-server-help-item-bg: #dcefe4;
  --mobile-server-help-item-hover: #cde7d8;
  --mobile-server-help-item-text: #133a28;
  --mobile-help-handle: rgba(98, 150, 121, 0.55);
  --mobile-account-bg: linear-gradient(180deg, #d4ebde 0%, #c6e1d2 100%);
  --mobile-account-border: #7aa98f;
  --mobile-account-top-bg: rgba(153, 195, 172, 0.25);
  --mobile-account-top-border: rgba(98, 150, 121, 0.4);
  --mobile-account-item-bg: #dcefe4;
  --mobile-account-item-hover: #cde7d8;
  --mobile-account-item-text: #133a28;
  --mobile-account-logout-bg: #e4c5c5;
  --mobile-account-logout-text: #5a1f1f;
}

body.light .server-create-form input,
body.light .server-create-form select,
body.light .server-select-row select,
body.light .files-list,
body.light .account-setting.card,
body.light .account-setting-input-group,
body.light .account-setting-input-group input,
body.light .access-box,
body.light .access-token-row input,
body.light .access-list li,
body.light .btn,
body.light .btn.btn-white,
body.light .file-action-btn {
  background: #eaf7ef;
  color: #113322;
}

body.light .server-create-form input,
body.light .server-create-form select,
body.light .server-select-row select,
body.light .account-setting-input-group,
body.light .account-setting-input-group input,
body.light .access-token-row input,
body.light .file-action-btn,
body.light .btn,
body.light .btn.btn-white {
  border-color: #88b39a;
}

body.light .btn.btn-white {
  background: #dff1e6;
  color: #18462f;
}

body.light .btn.btn-green {
  background: rgba(31, 154, 87, 0.14);
  color: #165838;
}

body.light .files-list,
body.light .account-setting.card,
body.light .access-box {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.light .mobile-categories {
  background: rgba(232, 246, 237, 0.96);
  border-top-color: #88b39a;
}

body.light .mobile-categories .category {
  background: #eef8f2;
  color: #1a4a33;
  border-color: #88b39a;
}

body.light .mobile-categories .category.active {
  background: #dff2e7;
  color: #123826;
  border-color: #1f9a57;
}

body.light .console,
body.light #logs-output,
body.light .console-offline-wrapper,
body.light .plugin-card,
body.light .profile-card,
body.light .profile-player-avatar,
body.light .profile-stat-card,
body.light .profile-toolbar-select select,
body.light .players-stat,
body.light .players-list-card,
body.light .players-table,
body.light .players-actions-toggle,
body.light .players-actions-menu,
body.light .players-menu-item,
body.light .admin-users-manager,
body.light .admin-register-manager,
body.light .admin-props-manager,
body.light .admin-auth-log-manager,
body.light .admin-files-upload-manager,
body.light .admin-auth-log-output,
body.light .admin-tab-btn,
body.light .backup-box,
body.light .backup-server-account,
body.light .backup-provider-storage-usage,
body.light .type-input,
body.light .create-backup-select,
body.light .backup-drive-select,
body.light dialog.alert.alert-main,
body.light .backup-name-wrap,
body.light .backup-record,
body.light .world-upload-menu,
body.light .files-upload-progress,
body.light .files-paste-dialog,
body.light .files-paste-folder-item,
body.light .schedule-workspace,
body.light .schedule-form.schedule-form-exact,
body.light .schedule-linked-panel,
body.light .schedule-saved-panel,
body.light .schedule-group,
body.light .schedule-linked-empty,
body.light .schedule-empty,
body.light .schedule-task-card,
body.light .schedule-field input,
body.light .schedule-field select,
body.light .schedule-field textarea,
body.light .schedule-form-group input,
body.light .schedule-form-group select {
  background: #eaf7ef;
  color: #113322;
  border-color: #88b39a;
}

body.light .console-title,
body.light .console .in,
body.light .profile-card-head,
body.light .players-table-head,
body.light .admin-tab-btn.active,
body.light .files-paste-browser-toolbar,
body.light .schedule-panel {
  background: #dff1e6;
  color: #123826;
  border-color: #88b39a;
}

body.light .console .out,
body.light #logs-output,
body.light .admin-auth-log-output {
  color: #1c4c34;
}

body.light .console #c-input,
body.light .profile-toolbar-select select,
body.light .schedule-field input,
body.light .schedule-field select,
body.light .schedule-field textarea,
body.light .schedule-form-group input,
body.light .schedule-form-group select,
body.light .backup-name-input,
body.light .files-paste-current-path {
  background: #f6fcf8;
  color: #113322;
  border-color: #88b39a;
}

body.light .admin-tab-btn:hover,
body.light .players-actions-toggle:hover,
body.light .players-menu-item:hover,
body.light .files-paste-folder-item:hover,
body.light .files-paste-folder-item.current,
body.light .world-upload-menu button:hover {
  background: #dff2e7;
}

body.light .players-badge,
body.light .players-chip,
body.light .players-state,
body.light .schedule-chip,
body.light .schedule-linked-task-card,
body.light .schedule-task-card,
body.light .world-icon-wrap {
  background: #dff1e6;
  color: #18462f;
  border-color: #88b39a;
}

body.light .world-name,
body.light .world-name i,
body.light .world-toggle-row .toggle-label,
body.light .schedule-workspace h4,
body.light .schedule-group h5,
body.light .schedule-linked-panel h5,
body.light .schedule-saved-head h5,
body.light .schedule-task-head h6,
body.light .schedule-form-group label,
body.light .schedule-check-flat,
body.light .backup-server-account-name,
body.light .backups-list-head h3,
body.light .headline-container h2,
body.light .alert-title {
  color: #123826;
}

body.light .backup-server-account-storage,
body.light .backup-drive-note,
body.light .backup-add-alert .text,
body.light .schedule-form-group .text-muted,
body.light .schedule-task-head p,
body.light .schedule-status,
body.light .schedule-empty,
body.light .headline-container a,
body.light .headline-container .help-link,
body.light .alert-close {
  color: #4f745d;
}

body.light .schedule-eyebrow {
  background: rgba(31, 154, 87, 0.14);
  color: #1b6b43;
}

body.light .schedule-actions .action-btn {
  border-color: #88b39a;
}

body.light .schedule-actions .action-btn:not(.ghost):not(.danger) {
  background: #1f9a57;
  color: #f6fff8;
}

body.light .schedule-actions .action-btn.ghost {
  background: #eef8f2;
  color: #18462f;
}

body.light .backup-name-input::placeholder {
  color: #6f8f7b;
}

body.light .backup-server-account::before {
  background: linear-gradient(90deg, rgba(31, 154, 87, 0.12) 0, rgba(31, 154, 87, 0.12) var(--usage), transparent var(--usage), transparent 100%);
}

body.light .profile-stat-card.success strong,
body.light .plugin-state.installed,
body.light .plugin-source.local {
  color: #1d7a49;
}

body.light .profile-stat-card.accent strong {
  color: #1f6aa5;
}

body.light .profile-stat-card.danger strong,
body.light .plugin-state.disabled,
body.light .plugin-source.remote {
  color: #9a5c1f;
}

body.light .plugin-state.available,
body.light .profile-mc-slot-label,
body.light .console .out-line.muted,
body.light #logs-output .out-line.muted {
  color: #4f745d;
}

body.dashboard-active {
  background: var(--bg);
  animation: none;
}

.app-view[hidden] {
  display: none !important;
}

html.initial-not-home #view-home {
  display: none !important;
}

.menubar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: var(--topbar-bg);
  border-bottom: 4px solid var(--topbar-border);
  z-index: 2147483590;
  backdrop-filter: blur(3px);
}

.menu-logo {
  color: var(--brand-text);
  text-decoration: none;
  text-shadow: 2px 2px var(--brand-shadow);
}

.menu-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.menu-center-label {
  text-align: center;
  color: var(--menu-label-text);
  font-size: 0.64rem;
  letter-spacing: 1px;
  text-shadow: 1px 1px var(--menu-label-shadow);
  min-width: 120px;
}

.menu-center-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--menu-btn-border);
  background: var(--menu-btn-bg);
  color: var(--menu-btn-text);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.menu-center-btn:hover {
  background: var(--menu-btn-hover-bg);
  border-color: var(--menu-btn-focus);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.menu-center-btn:active {
  transform: translateY(1px);
}

.menu-center-btn:focus-visible {
  outline: 2px solid var(--menu-btn-focus);
  outline-offset: 2px;
}

.menu-center-btn:disabled,
.menu-center-btn[hidden] {
  display: none;
}

.config-options-file {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.config-options-file h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.card-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.config-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

@media (max-width: 1180px) {
  .config-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .config-options {
    grid-template-columns: 1fr;
  }
}

.config-option {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  min-width: 0;
}

.config-option[hidden] {
  display: none !important;
}

.config-option.config-option-full-width {
  grid-column: 1 / -1;
}

.config-option-input {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.config-option-input label {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.85rem;
  line-height: 1.2;
  flex: 1 1 auto;
  white-space: normal;
  word-break: break-word;
}

.config-option-output {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  padding-top: 2px;
  overflow-wrap: anywhere;
}

.config-option-output-key {
  font-weight: 700;
}

.options-save {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  flex: 0 0 auto;
}

.type-input {
  display: flex;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 52px;
  gap: 8px;
  overflow: hidden;
}

.type-input-icon {
  color: var(--muted);
}

.type-input input,
.type-input textarea {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.15;
  padding: 4px 0;
  height: auto;
}

.type-input textarea {
  resize: vertical;
}

.number-input {
  min-width: 0;
}

.number-input-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.number-input-controls .input-number-up,
.number-input-controls .input-number-down {
  width: 22px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  flex: 0 0 auto;
}

.select {
  position: relative;
  min-width: 140px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 46px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}

.select .option.current {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

.select-options {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 3;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  overflow: hidden;
}

.select.open .select-options {
  display: block;
}

.select-options .option {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.select-options .option:last-child {
  border-bottom: none;
}

.select-options .option:hover {
  background: rgba(255,255,255,0.05);
}

.toggle {
  position: relative;
  width: 56px;
  height: 28px;
  flex: 0 0 auto;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.toggle label {
  position: absolute;
  inset: 0;
  background: #3c4d3c;
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle label::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e8ffe8;
  transition: transform 0.2s ease;
}

.toggle input:checked + label {
  background: var(--accent);
  border-color: #69f59e;
}

.toggle input:checked + label::after {
  transform: translateX(26px);
}

.toggle.inverted input:checked + label {
  background: #ee9f58;
  border-color: #ffc58c;
}

.resource-pack-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.resource-pack-input input {
  width: 100%;
}

.config-options-actions {
  display: flex;
  justify-content: flex-end;
}

.menu-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.menu-account-shell {
  gap: 14px;
}

.menu-account-shell[hidden],
.menu-links #menu-logout[hidden] {
  display: none !important;
}

.menu-links > .header-right {
  align-items: flex-end;
}

.menu-links .account-navigation {
  align-items: flex-end;
  gap: 18px;
}

.menu-links .account-navigation .item {
  min-width: 74px;
  padding: 0;
  border: 0;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  font-size: 0.66rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.menu-links .account-navigation .item i {
  font-size: 1.6rem;
  width: auto;
}

.menu-links .user {
  align-items: center;
  gap: 14px;
}

.menu-links .usertext {
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.menu-links .username a {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
}

.menu-links .username {
  display: flex;
  align-items: center;
  gap: 0;
}

.menu-links .username .user-role-badge {
  display: none !important;
}

.menu-links .userlinks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.menu-links .userlinks a,
.menu-links #menu-logout {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.62rem;
  color: rgba(216, 255, 216, 0.82);
}

.menu-links .userlinks a:hover,
.menu-links .userlinks a:focus-visible {
  color: #ffffff;
  background: transparent;
  border-color: transparent;
}

.menu-links .logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-links .usericon {
  font-size: 3.1rem;
  line-height: 1;
}

.menu-links .account-icon {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

.menu-links #menu-logout {
  display: none;
}

.menu-links a,
.menu-links button {
  color: #d8ffd8;
  text-decoration: none;
  padding: 8px 10px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.58rem;
}

.menu-links a:hover,
.menu-links button:hover {
  border-color: #8af58a;
  background: rgba(46, 139, 87, 0.35);
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.block {
  position: fixed;
  width: 40px;
  height: 40px;
  background: #8b5a2b;
  box-shadow: inset -5px -5px #5a3b1a;
  animation: float 10s infinite linear;
  pointer-events: none;
  z-index: 0;
}

body.dashboard-active .block {
  display: none;
}

@keyframes float {
  from { transform: translateY(100vh) rotate(0deg); }
  to { transform: translateY(-10vh) rotate(360deg); }
}

.home-view {
  position: relative;
  min-height: 100vh;
  z-index: 2;
}

.home-content {
  position: relative;
  top: 45vh;
  transform: translateY(-50%);
  text-align: center;
  padding: 0 20px;
}

.home-content h1 {
  font-size: 2em;
  text-shadow: 4px 4px #000;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 4px 4px #000, 0 0 10px #00ff00; }
  to { text-shadow: 4px 4px #000, 0 0 25px #00ff00; }
}

.home-content p {
  line-height: 1.8;
}

.btn {
  margin-top: 24px;
  padding: 15px 30px;
  background: #3cb371;
  border: 4px solid #1e3c1e;
  cursor: pointer;
  color: white;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s;
  font-family: inherit;
  font-size: 0.7rem;
}

.btn:hover {
  background: #2e8b57;
  transform: scale(1.05);
}

.btn[hidden] {
  display: none !important;
}

.footer {
  position: fixed;
  bottom: 10px;
  width: 100%;
  font-size: 10px;
  text-align: center;
  z-index: 2;
}

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px 20px 40px;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: min(520px, 100%);
  background: rgba(8, 20, 8, 0.9);
  border: 4px solid #0f240f;
  box-shadow: 0 0 0 4px rgba(138, 245, 138, 0.25);
  padding: 24px;
}

.auth-card h1 {
  font-size: 1.2rem;
  margin: 0 0 14px;
}

.auth-subtitle {
  font-size: 0.58rem;
  color: #d8ffd8;
  margin: 0 0 18px;
  line-height: 1.9;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-btn {
  font-family: inherit;
  border: 3px solid #1e3c1e;
  background: #2b5f2b;
  color: #e9ffe9;
  padding: 10px 12px;
  cursor: pointer;
}

.tab-btn.active {
  background: #3cb371;
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form > div {
  display: grid;
}

.auth-form > div[hidden] {
  display: none !important;
}

.auth-form input {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 3px solid #1e3c1e;
  background: #112811;
  color: #fff;
  padding: 12px;
  font-family: inherit;
}

.auth-form input:focus {
  outline: 3px solid #8af58a;
  outline-offset: 1px;
}

.auth-btn {
  width: 100%;
}

.auth-provider-wrap[hidden] {
  display: none !important;
}

.auth-provider-wrap {
  margin-top: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #d8ffd8;
  font-size: 0.52rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 2px solid rgba(138, 245, 138, 0.24);
}

.auth-divider span {
  display: inline-block;
}

.auth-google-btn {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  border-color: #1e3c1e;
  color: #17321d;
}

.auth-google-btn:hover {
  background: #f2fff4;
}

.auth-message {
  min-height: 24px;
  margin-top: 14px;
  font-size: 0.58rem;
  line-height: 1.8;
}

.auth-message.ok {
  color: #b8ffb8;
}

.auth-message.error {
  color: #ffd0d0;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  padding-top: 82px;
  transition: grid-template-columns 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-shell.nav-collapsed {
  grid-template-columns: 88px 1fr;
}

.navigation-desktop {
  background: rgba(8, 14, 10, 0.9);
  border-right: 3px solid var(--border);
  width: 320px;
  min-width: 320px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 82px;
  height: calc(100vh - 82px);
  overflow: hidden;
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1), min-width 420ms cubic-bezier(0.22, 1, 0.36, 1), padding 420ms cubic-bezier(0.22, 1, 0.36, 1), gap 320ms ease;
}

.navigation-server {
  border: 2px solid var(--border);
  background: var(--panel);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 320ms ease, gap 320ms ease;
}

.navigation-server-info {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: max-width 360ms ease, opacity 280ms ease, transform 360ms ease;
}

.navigation-server-name {
  font-size: 0.92rem;
}

.navigation-server-detail {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.navigation-server-icon {
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--danger);
  font-size: 1.2rem;
}

.statusplayerbadge {
  font-size: 0.64rem;
  background: #0f1b13;
  border: 1px solid var(--border);
  padding: 4px 6px;
}

.navigation-list {
  display: grid;
  gap: 8px;
}

.item {
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid transparent;
  background: var(--panel);
  font-size: 0.76rem;
  transition: padding 320ms ease, justify-content 320ms ease, gap 320ms ease, background 220ms ease, border-color 220ms ease;
}

.navigation-item-label {
  display: inline-block;
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: max-width 360ms ease, opacity 280ms ease, transform 360ms ease;
}

.navigation-list .item i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

.item:hover,
.item.active {
  border-color: var(--accent);
  background: var(--panel-2);
}

.navigation-list .item[hidden],
.mobile-server-drawer li[hidden],
.mobile-server-drawer .item[hidden] {
  display: none !important;
}

.navigation-settings {
  margin-top: auto;
}

.navigation-settings .inner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.navigation-darkmode-toggle,
.navigation-toggle {
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  padding: 10px 12px;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, opacity 280ms ease, transform 320ms ease, max-width 360ms ease, padding 320ms ease;
}

.navigation-toggle i {
  display: inline-block;
  transition: transform 320ms ease;
}

.dashboard-main {
  padding: 26px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.welcome {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.account-navigation .item {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 84px;
  color: #e6edf6;
  font-size: 0.64rem;
  text-decoration: none;
}

.account-navigation .item i {
  margin: 0;
  font-size: 1.35rem;
  color: #f1f5f9;
}

.user {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.usertext {
  display: grid;
  gap: 6px;
}

.username a,
.userlinks a,
.account-icon {
  color: #e7edf6;
  text-decoration: none;
  font-size: 0.64rem;
}

.username a {
  font-size: 0.86rem;
}

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

.logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.usericon {
  font-size: 2.1rem;
  line-height: 1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.42rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  border: 3px solid var(--border);
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 180px;
}

.card[hidden] {
  display: none !important;
}

[data-panel='console'],
.schedule-dashboard-card {
  grid-column: 1 / -1;
}

.card-primary {
  box-shadow: 0 0 0 3px rgba(73, 209, 125, 0.15);
}

.card h2 {
  font-size: 1rem;
}

.card p {
  font-size: 0.74rem;
  line-height: 1.8;
  color: var(--muted);
}

.console {
  position: relative;
  border: 2px solid var(--border);
  background: #0d1610;
  height: 420px;
  min-height: 420px;
  max-height: 420px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

html[lang='ar'] .console,
html[lang='ar'] .console-title,
html[lang='ar'] .console-title-actions,
html[lang='ar'] .console .out,
html[lang='ar'] .console .in,
html[lang='ar'] .console #c-input,
html[lang='ar'] .console .out-line,
html[lang='ar'] .console-offline-text {
  direction: ltr;
  text-align: left;
}

.console-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 2px solid var(--border);
  background: #122117;
  font-size: 0.8rem;
}

.console-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-dashboard-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.schedule-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(126, 171, 139, 0.18);
  background: linear-gradient(180deg, rgba(23, 37, 28, 0.96), rgba(18, 29, 22, 0.94));
}

.schedule-card-head h2 {
  margin: 0;
}

.schedule-card-head .hint {
  margin: 8px 0 0;
}

.btn.btn-white.btn-small.log-button {
  margin: 0;
  padding: 8px 10px;
  border: 2px solid #cdd8d0;
  background: #f6fff8;
  color: #15241b;
  font-size: 0.62rem;
}

.btn.btn-white.btn-small.log-button i {
  margin-right: 4px;
}

#console-autoscroll-btn[aria-pressed='false'] {
  opacity: 0.75;
}

#console-autoscroll-btn:hover {
  opacity: 1;
}

.console .out {
  padding: 12px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #ccffd8;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
}

.schedule-panel {
  padding: 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(83, 152, 109, 0.14), transparent 32%),
    linear-gradient(180deg, #0f1912 0%, #0b120d 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #e9f5ed;
}

.schedule-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: 100%;
}

.schedule-workspace {
  border: 1px solid rgba(126, 171, 139, 0.18);
  border-radius: 18px;
  background: rgba(16, 26, 20, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.schedule-workspace {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.schedule-editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.schedule-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(73, 209, 125, 0.12);
  color: #9fe5b5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-workspace h4,
.schedule-group h5 {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: normal;
  color: #f3fbf5;
}

.schedule-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-workspace h4 {
  margin-top: 8px;
  font-size: 1.1rem;
}

.schedule-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 171, 139, 0.16);
  background: rgba(25, 41, 31, 0.82);
  color: #dcefe2;
  font-size: 0.78rem;
  font-weight: 600;
}

.schedule-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.schedule-form.schedule-form-exact {
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid rgba(126, 171, 139, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 37, 28, 0.86), rgba(16, 24, 19, 0.94));
  padding: 16px;
}

.schedule-form-group {
  display: grid;
  gap: 10px;
}

.schedule-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #d7ebde;
}

.schedule-form-group .text-muted {
  color: #98b8a2;
  font-size: 0.74rem;
  font-weight: 500;
}

.schedule-form-group input,
.schedule-form-group select {
  width: 100%;
  border: 1px solid rgba(126, 171, 139, 0.2);
  border-radius: 12px;
  background: #101913;
  color: #eff8f1;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 12px 14px;
}

.schedule-form-group input:focus,
.schedule-form-group select:focus {
  outline: none;
  border-color: rgba(73, 209, 125, 0.58);
  box-shadow: 0 0 0 3px rgba(73, 209, 125, 0.14);
  background: #132017;
}

.schedule-subsection,
.schedule-subsection-block {
  display: grid;
  gap: 12px;
}

.schedule-subsection[hidden],
.schedule-subsection-block[hidden],
.schedule-form-group[hidden] {
  display: none !important;
}

.schedule-check-row {
  display: grid;
}

.schedule-check-flat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e8f4ec;
  font-size: 0.92rem;
}

.schedule-check-flat input {
  width: 18px;
  height: 18px;
}

.schedule-actions.schedule-actions-exact {
  grid-column: auto;
}

.schedule-linked-panel {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid rgba(126, 171, 139, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 37, 28, 0.86), rgba(16, 24, 19, 0.94));
}

.schedule-linked-head {
  display: grid;
  gap: 6px;
}

.schedule-linked-panel h5 {
  margin: 0;
  font-size: 0.92rem;
  color: #f3fbf5;
}

.schedule-linked-list {
  display: grid;
  gap: 10px;
}

.schedule-linked-empty {
  padding: 12px 14px;
  border: 1px solid rgba(126, 171, 139, 0.14);
  border-radius: 12px;
  background: rgba(17, 28, 20, 0.78);
}

.schedule-linked-task-card {
  padding: 12px 14px;
}

.schedule-linked-task-card .schedule-task-head h6 {
  font-size: 0.9rem;
}

.schedule-linked-task-card .schedule-task-head p {
  font-size: 0.8rem;
}

.schedule-linked-task-card .schedule-task-meta {
  grid-template-columns: 1fr;
  gap: 10px;
}

.schedule-linked-task-card .schedule-task-meta .wide {
  grid-column: auto;
}

.schedule-linked-empty {
  color: #9cbda6;
  line-height: 1.6;
  font-size: 0.82rem;
}

.schedule-field {
  display: grid;
  gap: 8px;
}

.schedule-field-full {
  grid-column: 1 / -1;
}

.schedule-group {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(126, 171, 139, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 37, 28, 0.86), rgba(16, 24, 19, 0.94));
}

.schedule-group-wide {
  grid-column: 1 / -1;
}

.schedule-group h5 {
  font-size: 0.92rem;
}

.schedule-field-grid {
  display: grid;
  gap: 14px;
}

.schedule-field-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schedule-mode-fields {
  display: grid;
  gap: 14px;
}

.schedule-inline-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #98b8a2;
  line-height: 1.6;
}

.schedule-field span,
.schedule-toggle span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #d7ebde;
}

.schedule-field input,
.schedule-field select,
.schedule-field textarea {
  width: 100%;
  border: 1px solid rgba(126, 171, 139, 0.2);
  border-radius: 12px;
  background: #101913;
  color: #eff8f1;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 12px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.schedule-field input::placeholder,
.schedule-field textarea::placeholder {
  color: #7fa08a;
}

.schedule-field input:focus,
.schedule-field select:focus,
.schedule-field textarea:focus {
  outline: none;
  border-color: rgba(73, 209, 125, 0.58);
  box-shadow: 0 0 0 3px rgba(73, 209, 125, 0.14);
  background: #132017;
}

.schedule-field textarea {
  resize: vertical;
  min-height: 132px;
}

.schedule-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(126, 171, 139, 0.16);
  border-radius: 14px;
  background: rgba(27, 79, 49, 0.14);
}

.schedule-toggle input {
  width: 18px;
  height: 18px;
}

.schedule-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.schedule-status {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: #8db79b;
}

.schedule-saved-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(126, 171, 139, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 37, 28, 0.86), rgba(16, 24, 19, 0.94));
}

.schedule-saved-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-saved-head h5 {
  margin: 0;
  font-size: 0.92rem;
  color: #f3fbf5;
}

.schedule-saved-head .hint {
  margin-top: 6px;
}

.schedule-tasks-list {
  display: grid;
  gap: 12px;
}

.schedule-empty {
  padding: 18px;
  border: 1px dashed rgba(126, 171, 139, 0.22);
  border-radius: 14px;
  color: #9cbda6;
  font-size: 0.9rem;
  text-align: center;
}

.schedule-task-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(126, 171, 139, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(27, 42, 31, 0.85), rgba(16, 25, 18, 0.95));
}

.schedule-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-task-head h6 {
  margin: 0;
  font-size: 0.98rem;
  color: #f1fbf4;
}

.schedule-task-head p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #98b8a2;
}

.schedule-task-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.schedule-task-badge.enabled {
  background: rgba(73, 209, 125, 0.14);
  color: #9fe5b5;
}

.schedule-task-badge.disabled {
  background: rgba(239, 141, 86, 0.14);
  color: #ffbf9a;
}

.schedule-task-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.schedule-task-meta div {
  display: grid;
  gap: 4px;
}

.schedule-task-meta .wide {
  grid-column: 1 / -1;
}

.schedule-task-meta dt {
  font-size: 0.76rem;
  color: #9ec8a8;
}

.schedule-task-meta dd {
  margin: 0;
  font-size: 0.9rem;
  color: #edf7ef;
  line-height: 1.55;
  word-break: break-word;
}

.schedule-task-meta .error dd {
  color: #ffbf9a;
}

.schedule-task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.console .in {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 2px solid var(--border);
  background: #101b13;
}

.console .in-start {
  color: var(--accent);
  font-size: 0.85rem;
}

.console #c-input {
  width: 100%;
  border: 2px solid var(--border);
  background: #0a130d;
  color: var(--text);
  font-family: monospace;
  font-size: 0.75rem;
  padding: 8px;
}

.console .in-offline {
  color: #ffb481;
  font-size: 0.5rem;
}

.console-send-btn {
  white-space: nowrap;
}

.console-offline {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 10, 7, 0.55);
  pointer-events: none;
}

.console.online .console-offline {
  display: none;
}

.console.online .in-offline {
  display: none;
}

.console.offline #c-input {
  opacity: 0.55;
}

.console .out-line {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.console .out-line + .out-line {
  margin-top: 4px;
}

.console .out-line.muted {
  color: #88b99a;
}

#logs-output {
  padding: 12px;
  font-family: monospace;
  font-size: 1.1rem;
  color: #ccffd8;
  background: #0d1610;
  border: 2px solid var(--border);
}

#logs-output .out-line {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

#logs-output .out-line + .out-line {
  margin-top: 4px;
}

#logs-output .out-line.muted {
  color: #88b99a;
}

.console-offline-wrapper {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}

.console-offline-text {
  white-space: nowrap;
  display: inline-block;
  font-size: clamp(2.2rem, 8vw, 7rem);
  color: rgba(231, 247, 234, 0.18);
  letter-spacing: 3px;
}

.hint {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.7;
}

.server-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.server-meta-copy-btn {
  border: 1px solid var(--border);
  background: rgba(17, 32, 23, 0.92);
  color: var(--text);
  font-family: inherit;
  font-size: 0.6rem;
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.server-meta-copy-btn:hover,
.server-meta-copy-btn:focus-visible {
  border-color: var(--accent);
  background: rgba(27, 53, 37, 0.96);
  color: #f3fff6;
  outline: none;
}

.server-meta-copy-btn i {
  margin-right: 4px;
  color: var(--accent);
}

.server-create-form,
.server-select-row {
  display: grid;
  gap: 10px;
}

.server-create-form label,
.server-select-row label {
  font-size: 0.64rem;
  color: var(--text);
}

.server-create-form input,
.server-create-form select,
.server-select-row select {
  width: 100%;
  border: 2px solid var(--border);
  background: #0f1c14;
  color: var(--text);
  font-family: inherit;
  font-size: 0.68rem;
  padding: 10px;
}

.server-create-wrap,
#server-actions-wrap {
  display: grid;
  gap: 12px;
}

.server-create-wrap[hidden],
#server-actions-wrap[hidden] {
  display: none !important;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.files-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.files-upload-progress {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(86, 145, 108, 0.55);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 42, 28, 0.96), rgba(13, 29, 20, 0.96));
}

.files-upload-progress[hidden] {
  display: none !important;
}

.files-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.files-upload-progress-head strong {
  font-size: 0.58rem;
}

.files-upload-progress-head span {
  font-size: 0.5rem;
  color: #9de8b7;
}

.files-upload-progress progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  accent-color: #3cbf6c;
}

.files-upload-progress .hint {
  margin: 8px 0 0;
}

.files-path-prefix,
.files-path-sep {
  color: var(--muted);
}

.files-path-link {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.5rem;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.files-path-link:hover {
  color: var(--accent);
}

.files-list {
  border: 2px solid var(--border);
  background: #0f1c14;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: visible;
  display: grid;
  align-content: start;
}

.files-empty {
  padding: 14px;
  font-size: 0.5rem;
  color: var(--muted);
}

.file-entry {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(42, 75, 54, 0.8);
  background: transparent;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.file-entry:hover {
  background: rgba(73, 209, 125, 0.12);
}

.file-main-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
  font-family: inherit;
  min-width: 0;
  padding: 0;
}

.file-action-btn {
  border: 1px solid var(--border);
  background: #163022;
  color: var(--text);
  font-family: inherit;
  font-size: 0.42rem;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.file-action-btn:hover {
  border-color: var(--accent);
  background: #1e4b33;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.5rem;
  min-width: 0;
}

.file-name i {
  color: var(--accent);
}

.file-meta {
  font-size: 0.42rem;
  color: var(--muted);
}

.worldlist {
  display: grid;
  gap: 14px;
}

.world-card {
  border: 2px solid var(--border);
  background: var(--panel);
  padding: 14px 18px;
  display: grid;
  gap: 0;
}

.world-layout {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
}

.world-main {
  min-width: 0;
}

.world-name {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.72rem;
  color: #e8eef3;
  font-weight: 700;
}

.world-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.world-name i {
  color: #f1f5f9;
  font-size: 1.2rem;
}

.world-upgrade-settings {
  display: grid;
  gap: 10px;
  min-width: 190px;
}

.world-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.world-toggle-row .toggle-label {
  font-size: 0.54rem;
  color: #e7edf3;
}

.world-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.world-actions .action-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.5rem;
}

.world-actions .action-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.world-actions-stack {
  display: grid;
  gap: 7px;
  width: 150px;
}

.world-actions-stack .action-btn,
.world-actions-stack .world-upload-group > .action-btn {
  width: 100%;
  justify-content: center;
}

.world-actions-stack .action-btn.ghost {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  border-color: rgba(255, 255, 255, 0.95);
}

.world-actions-stack .action-btn[data-world-action="download"] {
  background: #2f9be8;
  color: #fff;
  border-color: #2f9be8;
}

.world-actions-stack .action-btn[data-world-action="toggle-upload-menu"] {
  background: #eb7f58;
  color: #fff;
  border-color: #eb7f58;
}

.world-actions-stack .action-btn[data-world-action="generate"] {
  background: #2ecf7f;
  color: #fff;
  border-color: #2ecf7f;
}

.world-upload-group {
  position: relative;
}

.world-upload-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  border: 1px solid var(--border);
  background: #102016;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.world-upload-menu[hidden] {
  display: none !important;
}

.world-upload-menu button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(42, 75, 54, 0.8);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.44rem;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.world-upload-menu button:last-child {
  border-bottom: 0;
}

.world-upload-menu button:hover {
  background: rgba(73, 209, 125, 0.14);
}

.plugins-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plugin-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #112217;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.plugin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plugin-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plugin-card-head h3 {
  margin: 0;
  font-size: 0.62rem;
  min-width: 0;
}

.plugin-state {
  border: 1px solid #4f6f5c;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.44rem;
  line-height: 1.2;
  white-space: nowrap;
}

.plugin-state.installed {
  border-color: #2fb361;
  color: #8ff2b1;
  background: rgba(47, 179, 97, 0.14);
}

.plugin-state.available {
  border-color: #6a8371;
  color: #c7d7cc;
  background: rgba(125, 146, 130, 0.12);
}

.plugin-state.disabled {
  border-color: #b88452;
  color: #ffd9b0;
  background: rgba(150, 100, 38, 0.2);
}

.plugin-source {
  border: 1px dashed #6a8371;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.44rem;
  line-height: 1.2;
  white-space: nowrap;
}

.plugin-source.local {
  border-color: #2fb361;
  color: #8ff2b1;
  background: rgba(47, 179, 97, 0.12);
}

.plugin-source.remote {
  border-color: #c08f53;
  color: #ffd7ab;
  background: rgba(141, 94, 34, 0.22);
}

.plugin-card .hint {
  margin: 0;
  min-height: 36px;
}

.plugin-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.plugin-card-actions .action-btn {
  min-height: 38px;
}

.profile-panel {
  display: grid;
  gap: 14px;
}

.profile-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-toolbar h2,
.profile-card-head h3,
.profile-player-meta h3,
.profile-mc-section-head h4 {
  margin: 0;
}

.profile-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-toolbar-select {
  display: grid;
  gap: 6px;
}

.profile-toolbar-select label {
  font-size: 0.48rem;
  color: var(--muted);
}

.profile-toolbar-select select {
  min-width: 240px;
  border: 2px solid var(--border);
  background: #0f1c14;
  color: var(--text);
  font-family: inherit;
  font-size: 0.5rem;
  padding: 10px;
}

.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-card {
  border: 2px solid var(--border);
  background: #112017;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.profile-achievements-card {
  grid-column: 1 / -1;
}

.profile-player-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #0c150f;
  image-rendering: pixelated;
}

.profile-player-meta {
  min-width: 0;
}

.profile-player-meta .hint {
  margin: 6px 0 0;
  word-break: break-all;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat-card {
  border: 1px solid rgba(89, 129, 104, 0.65);
  border-radius: 12px;
  background: #0e1a12;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.profile-stat-card .label {
  font-size: 0.46rem;
  color: var(--muted);
}

.profile-stat-card strong {
  font-size: 0.62rem;
}

.profile-stat-card.success strong {
  color: #8ff2b1;
}

.profile-stat-card.accent strong {
  color: #9ad5ff;
}

.profile-stat-card.danger strong {
  color: #ffd1d1;
}

.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-card-head.compact {
  margin-bottom: 8px;
}

.profile-achievement-item {
  border: 1px solid rgba(89, 129, 104, 0.65);
  border-radius: 10px;
  background: #0c1610;
  padding: 10px;
}

.profile-mc-layout {
  display: grid;
  gap: 12px;
  background: #c7c7c7;
  border: 3px solid #4a4a4a;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.38), inset -3px -3px 0 rgba(0, 0, 0, 0.26);
  max-width: 860px;
  margin: 0 auto;
  padding: 10px;
}

.profile-mc-upper {
  display: grid;
  grid-template-columns: 64px minmax(180px, 250px) minmax(170px, 1fr);
  gap: 12px;
  align-items: start;
}

.profile-mc-armor,
.profile-mc-hands {
  display: grid;
  gap: 8px;
  align-content: start;
}

.profile-mc-center {
  display: grid;
  gap: 8px;
}

.profile-mc-player-stage {
  border: 3px solid #4c4c4c;
  background: #1a1a1a;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 10px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.12), inset -3px -3px 0 rgba(0, 0, 0, 0.35);
}

.profile-mc-player-avatar {
  width: min(150px, 100%);
  image-rendering: pixelated;
}

.profile-mc-hand-row {
  display: grid;
  grid-template-columns: 56px;
  gap: 8px;
  justify-content: center;
}

.profile-mc-lower-utility {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  gap: 8px;
  justify-content: center;
}

.profile-mc-utility {
  display: grid;
  gap: 12px;
  align-content: start;
}

.profile-mc-crafting-head {
  font-size: 0.58rem;
  color: #2c2c2c;
}

.profile-mc-crafting-wrap {
  display: grid;
  grid-template-columns: auto 42px 56px;
  gap: 10px;
  align-items: center;
}

.profile-mc-crafting-grid {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  gap: 6px;
}

.profile-mc-crafting-arrow {
  position: relative;
  height: 18px;
}

.profile-mc-crafting-arrow::before,
.profile-mc-crafting-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.profile-mc-crafting-arrow::before {
  left: 0;
  right: 10px;
  height: 6px;
  background: #9b9b9b;
}

.profile-mc-crafting-arrow::after {
  right: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 14px solid #9b9b9b;
}

.profile-mc-utility-note {
  font-size: 0.4rem;
  color: #4f4f4f;
  line-height: 1.5;
}

.profile-mc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-mc-section-head h4 {
  margin: 0;
}

.profile-mc-section-head.compact {
  margin-top: 4px;
}

.profile-mc-storage,
.profile-mc-hotbar {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
}

.profile-mc-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px solid #5a5a5a;
  background: #8b8b8b;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.62), inset -2px -2px 0 rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.profile-mc-slot.selected {
  border-color: #f5f5f5;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.profile-mc-slot-label {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 0.28rem;
  color: #1d1d1d;
  opacity: 0.8;
}

.profile-mc-slot-code {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px 5px 5px;
  text-align: center;
  font-size: 0.34rem;
  color: #151515;
  line-height: 1.1;
  word-break: break-word;
}

.profile-mc-slot-icon {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  object-fit: contain;
  image-rendering: pixelated;
}

.profile-mc-slot-count {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 0.34rem;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000;
}

.profile-achievements-list {
  display: grid;
  gap: 8px;
}

.profile-achievement-item {
  display: grid;
  gap: 5px;
}

.profile-achievement-item strong {
  font-size: 0.52rem;
}

.profile-empty {
  border: 1px dashed rgba(89, 129, 104, 0.65);
  border-radius: 10px;
  background: rgba(12, 22, 16, 0.65);
  padding: 12px;
  font-size: 0.48rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .plugins-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .plugins-grid {
    grid-template-columns: 1fr;
  }
}

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-toolbar-select select {
    min-width: 0;
    width: 100%;
  }

@media (max-width: 980px) {
  [data-panel='plugins'] .files-toolbar {
    align-items: flex-start;
    justify-content: space-between;
  }

  [data-panel='plugins'] .files-toolbar h2 {
    margin: 0;
  }

  [data-panel='plugins'] .files-toolbar .action-btn {
    min-height: 40px;
    padding: 10px 14px;
  }

  .plugin-card {
    padding: 11px;
  }

  .plugin-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .plugin-badges {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .plugin-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .plugin-card-actions .action-btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .plugins-grid {
    gap: 10px;
  }

  .profile-toolbar-actions {
    width: 100%;
  }

  .profile-toolbar-actions .action-btn {
    width: 100%;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-mc-upper {
    grid-template-columns: 1fr;
  }

  .profile-mc-player-stage {
    min-height: 180px;
  }

  .profile-mc-crafting-wrap {
    grid-template-columns: 1fr;
  }

  .profile-mc-crafting-grid {
    justify-content: start;
  }

  .profile-mc-crafting-arrow {
    width: 56px;
    transform: rotate(90deg);
    margin-left: 10px;
  }

  .profile-mc-hand-row {
    justify-content: start;
  }

  .profile-mc-storage,
  .profile-mc-hotbar {
    gap: 4px;
  }

  .plugin-card {
    padding: 10px;
  }

  .plugin-card-head h3 {
    font-size: 0.58rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .plugin-card .hint {
    min-height: 0;
    font-size: 0.46rem;
    line-height: 1.5;
  }

  .plugin-card-actions {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

@media (max-width: 980px) {
  .world-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .world-upgrade-settings {
    min-width: 0;
    max-width: 320px;
  }

  .world-actions-stack {
    width: 100%;
    max-width: 280px;
  }
}

.context-menu {
  position: fixed;
  z-index: 140;
  display: none;
  flex-direction: column;
  min-width: 180px;
  border: 2px solid var(--border);
  background: #0e1a12;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.context-menu.show {
  display: flex;
}

.context-menu .menu-item {
  border-bottom: 1px solid rgba(42, 75, 54, 0.8);
}

.context-menu .menu-item[hidden] {
  display: none;
}

.context-menu .menu-item:last-child {
  border-bottom: 0;
}

.context-menu .menu-item h6 {
  margin: 0;
}

.context-menu .menu-item span {
  display: block;
  padding: 10px 12px;
  font-size: 0.5rem;
  color: var(--text);
  cursor: pointer;
}

.context-menu .menu-item span:hover {
  background: rgba(73, 209, 125, 0.14);
  color: #d8ffe6;
}

.file-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  padding: 20px;
}

.file-editor-modal[hidden] {
  display: none !important;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 170;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  padding: 20px;
}

.confirm-modal[hidden] {
  display: none !important;
}

.confirm-card {
  width: min(520px, 94vw);
  border: 2px solid #6e2b2b;
  background: linear-gradient(180deg, #191012 0%, #120b0d 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.confirm-card.delete-confirm-card {
  border-color: #a03b3b;
  background: linear-gradient(180deg, #2a1010 0%, #18090a 100%);
}

.confirm-card.world-generate-confirm-card {
  border-color: #2f8052;
  background: linear-gradient(180deg, #102318 0%, #0b1610 100%);
}

.confirm-card.world-generate-confirm-card h3 {
  color: #d7ffe7;
}

.confirm-card.world-generate-confirm-card .hint {
  color: #c7f1d7;
}

.confirm-card h3 {
  margin: 0;
  font-size: 0.62rem;
  color: #ffd5d5;
}

.confirm-card .hint {
  margin: 0;
  color: #f4d3d3;
  line-height: 1.8;
}

.confirm-card input[type="text"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f1c14;
  color: var(--text);
  padding: 10px 12px;
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.58rem;
}

.confirm-card input[type="text"]:focus-visible {
  outline: 2px solid #8af58a;
  outline-offset: 2px;
}

.files-paste-browser {
  display: grid;
  gap: 12px;
}

.files-paste-dialog {
  width: min(680px, 94vw);
  border-color: #418a5d;
  background:
    radial-gradient(circle at top right, rgba(78, 157, 108, 0.16), transparent 34%),
    linear-gradient(180deg, #102318 0%, #0b1610 100%);
}

.files-paste-dialog h3 {
  color: #e2ffed;
}

.files-paste-source-summary {
  border: 1px solid rgba(92, 155, 114, 0.45);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 50, 33, 0.95), rgba(12, 29, 20, 0.95));
  color: #d7ffe7;
  padding: 12px 14px;
  font-size: 0.5rem;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.files-paste-browser-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.files-paste-browser-toolbar .action-btn {
  min-width: 96px;
}

.files-paste-current-path {
  margin: 0;
  border: 1px solid rgba(92, 155, 114, 0.38);
  border-radius: 10px;
  background: rgba(9, 23, 15, 0.9);
  color: #d5f7e3;
  padding: 10px 12px;
}

.files-paste-folder-list {
  border: 1px solid rgba(76, 130, 95, 0.55);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(14, 31, 21, 0.97), rgba(8, 18, 13, 0.97));
  min-height: 200px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.files-paste-folder-item {
  width: 100%;
  border: 1px solid rgba(62, 104, 77, 0.7);
  border-radius: 12px;
  background: linear-gradient(180deg, #102016, #0d1a13);
  color: var(--text);
  font: inherit;
  font-size: 0.5rem;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.files-paste-folder-item:hover {
  border-color: #72b28a;
  background: linear-gradient(180deg, #183726, #12281c);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.files-paste-folder-item.current {
  border-color: #8fceaa;
  background: linear-gradient(180deg, #1d402c, #163222);
  box-shadow: 0 0 0 1px rgba(143, 206, 170, 0.16);
}

.files-paste-folder-item:focus-visible {
  outline: 2px solid #8fceaa;
  outline-offset: 2px;
}

.files-paste-folder-item .folder-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.52rem;
  color: #effff5;
}

.files-paste-folder-item .folder-title i {
  color: #9de8b7;
}

.files-paste-folder-item.current .folder-title i {
  color: #c9ffd8;
}

.files-paste-folder-item .folder-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.42rem;
}

.files-paste-folder-item .folder-action {
  display: inline-block;
  margin-top: 8px;
  color: #9de8b7;
  font-size: 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.files-paste-folder-empty {
  border: 1px dashed rgba(76, 130, 95, 0.55);
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  font-size: 0.48rem;
  background: rgba(11, 24, 17, 0.6);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.action-btn.danger {
  border-color: #9a3b3b;
  background: #5f2323;
  color: #ffe4e4;
}

.action-btn.danger:hover {
  background: #6d2929;
}

.file-editor-card {
  width: min(960px, 94vw);
  height: min(78vh, 820px);
  border: 2px solid var(--border);
  background: #0f1c14;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 12px;
}

.file-editor-head h3 {
  margin: 0;
  font-size: 0.62rem;
}

#file-editor-path {
  margin: 8px 0 0;
}

#file-editor-text {
  width: 100%;
  min-height: 0;
  border: 2px solid var(--border);
  background: #08110c;
  color: var(--text);
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', 'Liberation Mono', monospace;
  font-size: 0.45rem;
  line-height: 1.6;
  resize: none;
  padding: 12px;
}

.file-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.action-btn {
  border: 2px solid var(--accent);
  background: #1b4f31;
  color: var(--text);
  font-family: inherit;
  font-size: 0.68rem;
  padding: 10px;
  cursor: pointer;
}

.action-btn.ghost {
  border-color: var(--border);
  background: transparent;
}

.admin-users-manager {
  margin-top: 18px;
  border: 2px solid var(--border);
  background: #112017;
  padding: 12px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 10px;
}

.admin-tab-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #182d21;
  color: var(--text);
  font-family: inherit;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.admin-tab-btn:hover {
  border-color: #5f8a6e;
  background: #1d3427;
}

.admin-tab-btn:active {
  transform: translateY(1px);
}

.admin-tab-btn:focus-visible {
  outline: 2px solid #8fceaa;
  outline-offset: 2px;
}

.admin-tab-btn.active {
  border-color: var(--accent);
  background: #204230;
}

@media (max-width: 760px) {
  .admin-tabs {
    grid-template-columns: 1fr;
  }
}

.admin-register-manager {
  margin-top: 18px;
  border: 2px solid var(--border);
  background: #112017;
  padding: 12px;
}

.admin-props-manager {
  margin-top: 18px;
  border: 2px solid var(--border);
  background: #112017;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-auth-log-manager {
  margin-top: 18px;
  border: 2px solid var(--border);
  background: #112017;
  padding: 12px;
  display: grid;
  gap: 10px;
}

[data-admin-tab-panel][hidden] {
  display: none !important;
}

.admin-props-manager[hidden],
.admin-auth-log-manager[hidden],
.admin-register-manager[hidden],
.admin-create-manager[hidden],
.admin-files-upload-manager[hidden],
.admin-users-manager[hidden] {
  display: none !important;
}

.admin-auth-log-output {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d1811;
  color: #dcefe0;
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.75;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

.admin-files-upload-manager {
  margin-top: 18px;
  border: 2px solid var(--border);
  background: #112017;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-props-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-props-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #14271c;
  max-height: 860px;
  overflow: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .admin-props-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-props-list {
    grid-template-columns: 1fr;
  }
}

.admin-props-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(42, 75, 54, 0.7);
  border-radius: 10px;
  padding: 12px 14px;
  background: #102016;
}

.admin-props-item strong {
  font-size: 0.6rem;
  word-break: break-all;
}

.admin-props-item span {
  font-size: 0.5rem;
  color: var(--muted);
}

.admin-props-item-meta {
  display: grid;
  gap: 4px;
}

.admin-props-state {
  display: inline-block;
  width: fit-content;
  font-size: 0.42rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 9px;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.admin-props-state.visible {
  color: #a7f3c8;
  background: rgba(28, 84, 53, 0.55);
  border-color: rgba(107, 210, 153, 0.35);
}

.admin-props-state.disabled {
  color: #ffd3a0;
  background: rgba(110, 55, 18, 0.45);
  border-color: rgba(255, 179, 102, 0.4);
}

.admin-props-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.admin-register-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-register-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.admin-register-card {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #14271c;
}

.admin-register-card strong {
  font-size: 0.6rem;
}

.admin-register-card .hint {
  margin-top: 6px;
}

.admin-max-servers-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-max-servers-input {
  width: 110px;
}

.admin-files-upload-card {
  align-items: flex-start;
}

.admin-files-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-files-upload-input {
  width: min(420px, 100%);
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101d15;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.admin-files-upload-input:focus {
  outline: 2px solid #8fceaa;
  outline-offset: 2px;
}

#admin-register-toggle[aria-pressed='false'] {
  border-color: #6a3a2b;
  background: #4f291d;
}

.admin-users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-users-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.players-panel {
  display: grid;
  gap: 14px;
}

.players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.players-head h2 {
  margin: 0;
}

.players-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.players-stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #102117;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.players-stat .label {
  color: var(--muted);
  font-size: 0.5rem;
}

.players-stat strong {
  font-size: 0.9rem;
}

.players-stat.online strong {
  color: #7df0a7;
}

.players-stat.offline strong {
  color: #b3c9bb;
}

.players-stat.danger strong {
  color: #ffad8a;
}

.players-lists-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.players-list-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #112217;
  padding: 12px;
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.players-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.players-list-head h3 {
  margin: 0;
  font-size: 0.74rem;
}

.players-badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #162e20;
  padding: 4px 8px;
  font-size: 0.46rem;
}

.players-grid {
  display: grid;
  gap: 6px;
  max-height: 430px;
  overflow: auto;
}

.players-table {
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: visible;
  background: #0f1d14;
}

.players-table-head {
  display: grid;
  grid-template-columns: 46px minmax(180px, 1fr) minmax(210px, auto);
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: #153022;
  color: var(--muted);
  font-size: 0.46rem;
}

.players-badges {
  display: inline-flex;
  gap: 4px;
  margin-right: 8px;
  flex-wrap: wrap;
}

.players-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(50, 90, 50, 0.5);
  color: #d8ffd8;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid rgba(138, 245, 138, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.players-badge.op {
  background: rgba(255, 221, 128, 0.25);
  border-color: rgba(255, 221, 128, 0.8);
  color: #ffe9a3;
}

.players-badge.wl {
  background: rgba(120, 200, 255, 0.25);
  border-color: rgba(120, 200, 255, 0.8);
  color: #d6ecff;
}

.players-badge.danger {
  background: rgba(255, 94, 94, 0.22);
  border-color: rgba(255, 94, 94, 0.9);
  color: #ffd6d6;
}

.players-badge.pending {
  background: rgba(250, 195, 95, 0.22);
  border-color: rgba(250, 195, 95, 0.85);
  color: #ffe6ab;
}

.player-row {
  margin: 0;
  border-bottom: 1px solid rgba(55, 89, 69, 0.5);
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 46px minmax(180px, 1fr) minmax(210px, auto);
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.player-row:last-child {
  border-bottom: 0;
}

.playercard-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.players-actions {
  position: relative;
}

.players-actions-toggle {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #1a3022;
  color: var(--text);
  font: inherit;
  font-size: 0.62rem;
  font-weight: bold;
  line-height: 1;
  padding: 5px 9px;
  cursor: pointer;
}

.players-actions-toggle:hover {
  border-color: var(--accent);
  background: #22402d;
}

.players-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 156px;
  border: 1px solid #3a6a4e;
  border-radius: 9px;
  background: #1a3123;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45);
  padding: 6px;
  display: none;
  z-index: 40;
}

.players-actions-menu.floating {
  position: fixed;
  right: auto;
  top: 0;
  left: 0;
  z-index: 2147483000;
}

.players-actions.open .players-actions-menu {
  display: grid;
  gap: 6px;
}

.players-menu-item {
  border: 1px solid #2f5b42;
  border-radius: 7px;
  background: #102217;
  color: #f0fff4;
  text-align: left;
  font: inherit;
  font-size: 0.58rem;
  line-height: 1.35;
  padding: 8px 9px;
  cursor: pointer;
}

.players-menu-item:hover {
  background: #28563c;
  border-color: #4d936c;
}

.players-grid .player-avatar img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.players-grid .player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.players-chip {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.44rem;
  border: 1px solid transparent;
}

.players-chip.online {
  background: rgba(47, 179, 97, 0.15);
  border-color: #2fb361;
  color: #8ff2b1;
}

.players-chip.offline {
  background: rgba(125, 146, 130, 0.12);
  border-color: #6a8371;
  color: #c7d7cc;
}

.players-chip.danger {
  background: rgba(201, 89, 62, 0.18);
  border-color: #c9593e;
  color: #ffc0b1;
}

.players-chip.pending {
  background: rgba(214, 160, 58, 0.2);
  border-color: #d6a03a;
  color: #ffe8b4;
}

.players-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.5rem;
}

.players-state.error {
  color: #ffbf9a;
  border-color: #a45d46;
}

#players-action-feedback {
  min-height: 18px;
  margin: 0;
}

#players-action-feedback.ok {
  color: #9df0bb;
}

#players-action-feedback.error {
  color: #ffbe9c;
}

.players-state.loading::after {
  content: ' ...';
}

body:not(.is-admin) [data-admin-only] {
  display: none !important;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.account-setting.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #132419;
  padding: 0;
  overflow: hidden;
}

.account-setting .card-header {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}

.account-setting .title {
  font-size: 0.74rem;
  font-weight: 700;
}

.account-setting .card-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.account-setting-inputs {
  display: grid;
  gap: 10px;
}

.account-setting-input-group {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101d15;
  padding: 10px 12px;
}

.account-setting-input-group i {
  color: var(--muted);
}

.account-setting-input-group input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.account-setting-input-group input:focus {
  outline: none;
}

.language-input {
  position: relative;
}

.language-input-selector {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101d15;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  cursor: pointer;
  text-align: start;
}

#account-language-current {
  flex: 1 1 auto;
  text-align: start;
}

.language-input-list-container {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101d15;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  text-align: start;
}

.language-input-list-container[hidden] {
  display: none !important;
}

.language-select {
  border-bottom: 1px solid rgba(42, 75, 54, 0.8);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.54rem;
  text-align: start;
}

.language-select:last-child {
  border-bottom: 0;
}

.language-select:hover,
.language-select.active {
  background: rgba(73, 209, 125, 0.14);
}

.account-settings-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-settings-buttons .btn,
.account-settings-buttons .action-btn {
  min-height: 38px;
}

.account-settings-buttons .btn {
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  color: var(--text);
  background: #122319;
  cursor: pointer;
}

.btn.btn-white {
  border-color: #6a8371;
  background: #1a2a20;
  color: #def1e2;
}

.btn.btn-green {
  border-color: var(--accent);
  background: rgba(73, 209, 125, 0.2);
  color: #c9ffd9;
}

.access-grid,
.access-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.access-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #132419;
  padding: 12px;
}

.access-box h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
}

.access-token-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 10px 0;
}

.access-token-row input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101d15;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.access-token-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.access-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.access-list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f1c14;
  padding: 8px 10px;
  font-size: 0.56rem;
}

.access-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.access-list-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.access-remove-btn {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 0.5rem;
}

@media (max-width: 900px) {
  .players-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .players-lists-grid {
    grid-template-columns: 1fr;
  }

  .players-table-head,
  .player-row {
    grid-template-columns: 40px minmax(120px, 1fr) minmax(160px, auto);
  }

  .access-grid,
  .access-lists {
    grid-template-columns: 1fr;
  }

  .account-settings-grid {
    grid-template-columns: 1fr;
  }

  .account-settings-buttons {
    width: 100%;
  }

  .account-settings-buttons .btn,
  .account-settings-buttons .action-btn {
    width: 100%;
  }
}

.admin-users-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  margin-top: 10px;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-users-table th,
.admin-users-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 0.65rem;
  text-align: left;
  vertical-align: middle;
}

.admin-users-table th {
  background: #1a2e22;
  color: var(--muted);
}

.admin-users-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.admin-actions-toggle {
  min-width: 36px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #183023;
  color: var(--text);
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}

.admin-actions-toggle:hover {
  border-color: var(--accent);
  background: #1d3c2b;
}

.admin-actions-toggle[aria-expanded='true'] {
  border-color: var(--accent);
}

.admin-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  max-height: 340px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0f1e15;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
  padding: 6px;
  display: none;
  z-index: 4;
  overflow-y: auto;
}

.admin-actions-menu.open {
  display: grid;
  gap: 4px;
}

.admin-users-actions:focus-within .admin-actions-menu {
  display: grid;
  gap: 4px;
}

.admin-actions-toggle:focus + .admin-actions-menu,
.admin-actions-toggle:active + .admin-actions-menu,
.admin-actions-toggle[aria-expanded='true'] + .admin-actions-menu {
  display: grid;
  gap: 4px;
}

.admin-actions-menu.floating {
  position: fixed;
  right: auto;
  top: 0;
  left: 0;
  z-index: 2147483646;
  max-width: min(92vw, 280px);
}

@media (max-width: 980px) {
  .admin-actions-menu.open,
  .admin-users-actions:focus-within .admin-actions-menu {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: 92px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100vh - 220px) !important;
    z-index: 2147483646 !important;
  }
}

.admin-actions-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.5rem;
  text-align: left;
  padding: 8px;
  cursor: pointer;
}

.admin-actions-item:hover:not([disabled]) {
  border-color: var(--border);
  background: #183223;
}

.admin-actions-item.danger {
  color: #ffb5b5;
}

.admin-actions-item.warning {
  color: #ffd29a;
}

.admin-actions-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 4px 0;
}

.admin-actions-item[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.admin-role-badge.admin {
  background: #5a1c1c;
  color: #ffd6d6;
}

.admin-role-badge.user {
  background: #183a61;
  color: #d3e9ff;
}

.admin-role-badge.moderator {
  background: #5a4a12;
  color: #ffe8a3;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.admin-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-status.online {
  color: #bafcc8;
}

.admin-status.online .admin-status-dot {
  background: #27c93f;
  box-shadow: 0 0 0 3px rgba(39, 201, 63, 0.18);
}

.admin-status.offline {
  color: #ffd0d0;
}

.admin-status.offline .admin-status-dot {
  background: #ff4d4f;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.18);
}

.navigation-desktop.collapsed {
  width: 88px;
  min-width: 88px;
}

.navigation-desktop.collapsed .navigation-item-label,
.navigation-desktop.collapsed .navigation-server-info,
.navigation-desktop.collapsed .navigation-settings .js-darkmode-toggle {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-8px);
}

.navigation-desktop.collapsed .navigation-settings .js-darkmode-toggle {
  border-width: 0;
  padding-left: 0;
  padding-right: 0;
}

.navigation-desktop.collapsed .navigation-list .item {
  justify-content: center;
  gap: 0;
  padding: 12px 10px;
}

.navigation-desktop.collapsed .navigation-list .item i {
  width: auto;
  margin: 0;
  font-size: 1.1rem;
}

/* Mobile bottom navigation */
.mobile-categories {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483600;
  display: none;
  background: rgba(8, 16, 12, 0.96);
  border-top: 2px solid var(--border);
  backdrop-filter: blur(6px);
}

.mobile-categories .categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.mobile-categories .category {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  background: #13251b;
  color: var(--text, #d9f0e0);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-categories .category i {
  font-size: 16px;
}

.mobile-categories .category.active {
  background: #1d3b2b;
  border-color: #34c759;
  color: #e8ffe7;
}

.mobile-categories .category:active {
  transform: translateY(1px);
}

.mobile-server-drawer,
.mobile-account-drawer,
.mobile-help-drawer {
  display: none;
}

@media (max-width: 980px) {
  .mobile-server-drawer,
  .mobile-account-drawer,
  .mobile-help-drawer {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 82px;
    z-index: 2147483580;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    padding: 14px 12px 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .mobile-server-drawer::before,
  .mobile-account-drawer::before,
  .mobile-help-drawer::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--mobile-drawer-handle);
    margin: -6px auto 10px;
  }

  .mobile-help-drawer::before {
    background: var(--mobile-help-handle);
  }

  .mobile-server-drawer.open,
  .mobile-account-drawer.open,
  .mobile-help-drawer.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-server-drawer .mobile-drawer-top,
  .mobile-account-drawer .mobile-drawer-top,
  .mobile-help-drawer .mobile-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  .mobile-server-drawer {
    border-color: var(--mobile-server-help-border);
    background: var(--mobile-server-help-bg);
  }

  .mobile-server-drawer .mobile-drawer-top {
    background: var(--mobile-server-help-top-bg);
    border: 1px solid var(--mobile-server-help-top-border);
    border-radius: 10px;
    padding: 8px 10px;
  }

  .mobile-account-drawer {
    border-color: var(--mobile-account-border);
    background: var(--mobile-account-bg);
  }

  .mobile-help-drawer {
    border-color: var(--mobile-server-help-border);
    background: var(--mobile-server-help-bg);
  }

  .mobile-account-drawer .mobile-drawer-top {
    background: var(--mobile-account-top-bg);
    border: 1px solid var(--mobile-account-top-border);
    border-radius: 10px;
    padding: 8px 10px;
  }

  .mobile-help-drawer .mobile-drawer-top {
    background: var(--mobile-server-help-top-bg);
    border: 1px solid var(--mobile-server-help-top-border);
    border-radius: 10px;
    padding: 8px 10px;
  }

  .mobile-help-drawer .mobile-drawer-title {
    color: var(--mobile-drawer-title);
  }

  .mobile-server-drawer .mobile-drawer-title,
  .mobile-account-drawer .mobile-drawer-title,
  .mobile-help-drawer .mobile-drawer-title {
    font-size: 0.9rem;
    color: var(--mobile-drawer-title);
  }

  .mobile-drawer-servers-btn {
    margin: 0;
    padding: 8px 10px;
    border: 2px solid var(--mobile-servers-btn-border);
    background: var(--mobile-servers-btn-bg);
    color: var(--mobile-servers-btn-text);
    font-size: 0.52rem;
  }

  .mobile-drawer-item-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-drawer-item-list .item {
    border: 0;
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text);
    min-height: 42px;
    justify-content: flex-start;
    padding-left: 12px;
  }

  .mobile-server-drawer .mobile-drawer-item-list .item {
    background: var(--mobile-server-help-item-bg);
    color: var(--mobile-server-help-item-text);
  }

  .mobile-server-drawer .mobile-drawer-item-list .item:hover,
  .mobile-server-drawer .mobile-drawer-item-list .item:focus-visible {
    background: var(--mobile-server-help-item-hover);
  }

  .mobile-account-item-list .item {
    background: var(--mobile-account-item-bg);
    color: var(--mobile-account-item-text);
  }

  .mobile-help-item-list .item {
    background: var(--mobile-server-help-item-bg);
    color: var(--mobile-server-help-item-text);
    border: 1px solid var(--mobile-server-help-top-border);
  }

  .mobile-account-item-list .item:hover,
  .mobile-account-item-list .item:focus-visible {
    background: var(--mobile-account-item-hover);
  }

  .mobile-help-item-list .item:hover,
  .mobile-help-item-list .item:focus-visible {
    background: var(--mobile-server-help-item-hover);
  }

  .mobile-account-item-list .mobile-account-logout {
    background: var(--mobile-account-logout-bg);
    color: var(--mobile-account-logout-text);
  }

  .mobile-drawer-item-list .item.active {
    outline: 2px solid #67e08d;
  }

  .mobile-account-item-list {
    margin-top: 0;
  }

  .mobile-help-item-list {
    margin-top: 0;
  }
}

@media (max-width: 980px) {
  .menubar {
    flex-direction: column;
    gap: 8px;
  }

  .menu-links {
    display: none !important;
  }

  .menu-center {
    width: 100%;
  }

  .mobile-categories {
    display: block;
  }

  .dashboard-shell {
    padding-bottom: 90px;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
    padding-top: 110px;
  }

  .dashboard-shell.nav-collapsed {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    min-width: 0;
    padding: 16px 12px;
    overflow-x: clip;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card {
    min-width: 0;
  }

  /* Hide desktop sidebar on mobile; rely on bottom nav */
  .navigation-desktop {
    display: none;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    display: none;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-users-head,
  .admin-register-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-users-head .action-btn,
  .admin-register-head .action-btn {
    width: 100%;
  }

  .admin-register-card {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-register-card .action-btn {
    width: 100%;
  }

  .admin-max-servers-row {
    width: 100%;
  }

  .admin-max-servers-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .admin-max-servers-row .action-btn {
    width: auto;
  }

  .admin-props-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #admin-server-props-save {
    grid-column: 1 / -1;
  }

  .admin-users-table-wrap {
    overflow-x: hidden;
  }

  .admin-users-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .admin-users-table thead {
    display: none;
  }

  .admin-users-table,
  .admin-users-table tbody,
  .admin-users-table tr,
  .admin-users-table td {
    display: block;
    width: 100%;
  }

  .admin-users-table tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #14271c;
    overflow: hidden;
  }

  .admin-users-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed rgba(79, 111, 92, 0.55);
    padding: 8px 10px;
    font-size: 0.62rem;
  }

  .admin-users-table td:last-child {
    border-bottom: 0;
  }

  .admin-users-table td::before {
    color: var(--muted);
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex: 0 0 86px;
  }

  .admin-users-table td:nth-child(1)::before { content: 'User'; }
  .admin-users-table td:nth-child(2)::before { content: 'Role'; }
  .admin-users-table td:nth-child(3)::before { content: 'Status'; }
  .admin-users-table td:nth-child(4)::before { content: 'IP'; }
  .admin-users-table td:nth-child(5)::before { content: 'Servers'; }
  .admin-users-table td:nth-child(6)::before { content: 'Created'; }
  .admin-users-table td:nth-child(7)::before { content: 'Actions'; }

  .admin-users-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-actions-menu {
    left: 0;
    right: auto;
    min-width: 190px;
  }

  .console {
    height: min(62vh, 520px);
    min-height: 360px;
    max-height: none;
  }

  .console-title {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .schedule-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .console-title-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .console-title-actions .btn.btn-white.btn-small.log-button,
  .console-title-actions a.btn.btn-white.btn-small.log-button {
    width: 100%;
    min-height: 42px;
    padding: 0;
    white-space: nowrap;
    font-size: 0;
    line-height: 1;
    justify-content: center;
    text-align: center;
  }

  .console-title-actions .btn.btn-white.btn-small.log-button i,
  .console-title-actions a.btn.btn-white.btn-small.log-button i {
    margin-right: 0;
    font-size: 0.92rem;
  }

  .console .out {
    font-size: 0.82rem;
  }

  .schedule-shell {
    grid-template-columns: 1fr;
  }

  .schedule-editor-shell {
    grid-template-columns: 1fr;
  }

  .schedule-workspace-head {
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-saved-head,
  .schedule-task-head {
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-chip-row {
    justify-content: flex-start;
  }

  .schedule-form {
    grid-template-columns: 1fr;
  }

  .schedule-field-grid-two {
    grid-template-columns: 1fr;
  }

  .schedule-task-meta {
    grid-template-columns: 1fr;
  }

  .schedule-field-full {
    grid-column: auto;
  }

  .console .in {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'input send'
      'state state';
    gap: 8px;
    padding: 10px;
  }

  .console .in-start {
    display: none;
  }

  .console #c-input {
    grid-area: input;
    min-height: 40px;
    font-size: 16px;
  }

  .console-send-btn {
    grid-area: send;
    min-width: 74px;
  }

  .console .in-offline {
    grid-area: state;
    justify-self: end;
    font-size: 0.6rem;
  }
}

@media (max-width: 760px) {
  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .admin-props-controls {
    grid-template-columns: 1fr;
  }
}

/* Hard mobile fix for Admin User Manager table */
@media (max-width: 1100px) {
  html,
  body {
    overflow-x: hidden;
  }

  .dashboard-main,
  .cards,
  .card,
  [data-panel="admin"],
  .admin-users-manager,
  .admin-users-table-wrap {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .admin-users-table-wrap {
    overflow-x: hidden !important;
  }

  .admin-users-table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
  }

  .admin-users-table thead {
    display: none !important;
  }

  .admin-users-table,
  .admin-users-table tbody,
  .admin-users-table tr,
  .admin-users-table td {
    display: block !important;
    width: 100% !important;
  }

  .admin-users-table tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #14271c;
    overflow: hidden;
  }

  .admin-users-table td {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed rgba(79, 111, 92, 0.55);
    padding: 8px 10px;
    font-size: 0.62rem;
  }

  .admin-users-table td:last-child {
    border-bottom: 0;
  }

  .admin-users-table td::before {
    color: var(--muted);
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex: 0 0 86px;
  }

  .admin-users-table td:nth-child(1)::before { content: 'User'; }
  .admin-users-table td:nth-child(2)::before { content: 'Role'; }
  .admin-users-table td:nth-child(3)::before { content: 'Status'; }
  .admin-users-table td:nth-child(4)::before { content: 'IP'; }
  .admin-users-table td:nth-child(5)::before { content: 'Servers'; }
  .admin-users-table td:nth-child(6)::before { content: 'Created'; }
  .admin-users-table td:nth-child(7)::before { content: 'Actions'; }
}

.backups-panel {
  display: grid;
  gap: 0.85rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.backup-box {
  background: #33414f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.95rem;
  box-shadow: none;
}

.backup-service-create {
  display: grid;
  gap: 1.15rem;
}

.backup-server-account-container,
.backup-create {
  display: grid;
  gap: 0.85rem;
}

.headline-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.headline-container h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.headline-container a,
.headline-container .help-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.backup-service-create .inner {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
  max-width: 100%;
  width: fit-content;
  justify-self: start;
}

.backup-server-account-list {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  gap: 0.7rem;
  align-items: center;
}

.backup-server-account {
  --usage: 0%;
  position: relative;
  width: 260px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.48rem 0.86rem 0.48rem 0.48rem;
  border-radius: 999px;
  background: #46596a;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  transition: width 0.24s ease, padding 0.24s ease, background-color 0.2s ease, transform 0.2s ease;
}

.backup-server-account:not(.open) {
  width: 56px;
  min-width: 56px;
  padding: 0.18rem;
  justify-content: center;
}

.backup-server-account:not(.open) .backup-server-account-details {
  display: none !important;
}

.backup-server-account:hover {
  transform: translateY(-1px);
}

.backup-server-account::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(129, 164, 191, 0.14) 0, rgba(129, 164, 191, 0.14) var(--usage), transparent var(--usage), transparent 100%);
  pointer-events: none;
}

.backup-provider-storage-usage {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #344654;
  border: 2px solid rgba(158, 185, 207, 0.22);
  color: #dce9f7;
  font-size: 1rem;
  box-sizing: border-box;
}

.backup-provider-storage-usage::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #2bd58c 0deg 62deg, transparent 62deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  pointer-events: none;
}

.backup-provider-storage-usage .inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.backup-server-account-details {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 0.02rem;
  flex: 1 1 auto;
}

.backup-server-account-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backup-server-account-storage {
  color: rgba(218, 231, 243, 0.88);
  font-size: 0.72rem;
  line-height: 1.05;
}

.backup-server-account-edit-mode-buttons {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.backup-server-account-container.is-editing .backup-server-account-edit-mode-buttons {
  display: flex;
}

.backup-server-account-container.is-editing .backup-server-account-storage {
  display: none;
}

.backup-server-account-container.is-editing .backup-server-account-list-buttons .edit {
  color: #fff;
}

.backup-server-account-container.is-editing .backup-server-account .delete[aria-disabled="true"] {
  opacity: 0.45;
}

.backup-server-account-move-buttons {
  display: flex;
  gap: 0.35rem;
}

.backup-server-account .btn-tiny {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 2px;
  font-size: 0.72rem;
  display: inline-grid;
  place-items: center;
}

.backup-server-account .btn-white {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.backup-server-account .btn-danger {
  background: #ce5959;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.backup-server-account .btn-disabled,
.backup-server-account [aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.backup-server-account-list-buttons {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.backup-square-btn {
  width: 38px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 2px;
  font-family: inherit;
}

#backups-drive-connect-btn {
  background: #3e9bf5;
  color: #fff;
  border: 0;
  box-shadow: none;
}

#backups-drive-manage-btn {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: #f4efe8;
  box-shadow: none;
}

#backups-drive-manage-btn:hover,
#backups-drive-manage-btn:focus-visible {
  transform: none;
  opacity: 0.9;
}

.backup-square-btn .btn-label {
  display: none;
}

.backup-drive-note {
  margin: 0;
  color: rgba(214, 229, 243, 0.82);
  font-size: 0.82rem;
  line-height: 1.3;
  min-height: 0;
  display: none;
}

.backup-service-create .btn {
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.55rem 0.8rem;
  font: inherit;
  text-decoration: none;
  box-sizing: border-box;
}

.backup-service-create .btn-small {
  min-height: 30px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
}

.backup-service-create .btn-notext {
  width: 40px;
  padding-left: 0;
  padding-right: 0;
}

.backup-service-create .btn-main {
  background: #3e9bf5;
  color: #fff;
}

.backup-service-create .btn-dark {
  background: rgba(50, 63, 75, 0.95);
  color: #fff;
}

.backup-service-create .btn-invisible {
  background: transparent;
  color: #f1e7db;
}

.backup-service-create .btn-inverted {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.backup-create .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.backup-create .type-input {
  background: rgba(67, 81, 94, 0.92);
  overflow: visible;
}

.backup-create .type-input.type-input-large.type-input-full-width {
  width: min(100%, 900px);
  align-items: center;
}

.type-input.type-input-large {
  font-size: 18px;
  min-height: 40px;
}

.type-input.type-input-full-width {
  width: 100%;
}

.type-input {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background-color: rgba(57, 70, 82, 0.92);
  color: #fff;
  font-size: 17px;
  width: 300px;
  min-height: 33px;
}

.type-input-large.type-input-full-width {
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.type-input-large.type-input-full-width > * {
  min-height: 40px;
  height: 40px;
}

.type-input-icon {
  display: grid;
  place-items: center;
  color: rgba(214, 229, 243, 0.9);
  width: 46px;
  flex: 0 0 46px;
}

.create-backup-select {
  min-width: 260px;
  height: 40px;
  display: flex;
  align-items: stretch;
  background: rgba(39, 50, 61, 0.72);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  flex: 0 0 260px;
}

#backups-create-account-inline {
  min-width: 260px;
  height: 40px;
  align-self: center;
  flex-basis: 260px;
}

#backups-create-account-inline .option {
  padding: 0 0.7rem;
  font-size: 0.78rem;
}

#backups-create-account-inline .option.current,
.create-backup-select .option.current {
  white-space: nowrap;
  word-break: normal;
  flex-wrap: nowrap;
}

.backup-name-input {
  height: 40px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 0.8rem 0 0;
  line-height: 40px;
  box-sizing: border-box;
}

.create-backup-select .option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
}

.create-backup-select .select-options {
  display: none;
}

.backup-account-add {
  background: #3e9bf5;
  color: #fff;
}

dialog.alert.alert-main {
  width: min(520px, calc(100vw - 2rem));
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #33414f;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

dialog.alert.alert-main::backdrop {
  background: rgba(8, 12, 16, 0.62);
}

dialog.alert.alert-main > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
}

.alert-title {
  font-size: 1rem;
  font-weight: 800;
}

.alert-close {
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

dialog.alert.alert-main > main {
  padding: 0 1rem 1rem;
}

.alert-body {
  display: grid;
  gap: 0.85rem;
}

.backup-add-alert {
  display: grid;
  gap: 0.9rem;
}

.backup-add-alert .backup-providers {
  display: grid;
  gap: 0.7rem;
}

.backup-add-alert .text {
  color: rgba(228, 236, 244, 0.88);
  font-size: 0.92rem;
}

.backup-provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-provider {
  min-height: 38px;
}

.backup-create-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: nowrap;
}

.backup-drive-select {
  min-width: 210px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  background: rgba(39, 50, 61, 0.72);
  color: #fff;
  padding: 0.6rem 0.8rem;
}

.backup-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px auto;
  gap: 0.55rem;
  align-items: center;
}

.backup-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: 2px;
  background: rgba(87, 104, 119, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 0.9rem;
  min-height: 40px;
}

.backup-name-wrap i {
  color: rgba(214, 229, 243, 0.9);
}

.backup-name-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
}

.backup-name-input::placeholder {
  color: rgba(218, 231, 243, 0.45);
}

.backup-create-button {
  min-height: 40px;
  height: 40px;
  white-space: nowrap;
  border-radius: 2px;
  background: #46a6ff;
  border: 0;
  align-self: center;
  flex: 0 0 auto;
  margin-top: 0;
}

.backups-message-inline {
  margin: 0;
  display: none;
}

.backups-list-card {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.backups-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.backups-list-head h3 {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
}

.backups-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.backup-record {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(21, 31, 40, 0.4);
  cursor: pointer;
}

.backup-record input {
  accent-color: #62b0ff;
  margin-top: 0.1rem;
}

.backup-record-main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.backup-record-main strong {
  color: #fff;
  word-break: break-word;
}

.backup-record-main .hint {
  margin: 0;
}

@media (max-width: 900px) {
  .backup-service-create .inner {
    flex-wrap: wrap;
  }

  .backup-server-account {
    width: 100%;
  }

  .backup-create-form {
    grid-template-columns: 1fr;
  }

  .backup-drive-select,
  .backup-create-button {
    width: 100%;
  }
}
