/* ==========================================================================
   WebFTP & Station Hub - Master Stylesheet
   Designed for High Visual Impact + Full Legacy Compatibility (Safari 6, Win7)
   ========================================================================== */

:root {
  --bg-main: #0b1120;
  --bg-card: #1e293b;
  --bg-card-hover: #283548;
  --bg-header: #0f172a;
  --bg-sidebar: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: #334155;
  --border-light: #475569;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0b1120;
  background-color: var(--bg-main, #0b1120);
  color: #f8fafc;
  color: var(--text-main, #f8fafc);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  flex-direction: column;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  min-height: 100vh;
}

/* Top App Header */
.app-header {
  background-color: #0f172a;
  background-color: var(--bg-header, #0f172a);
  border-bottom: 1px solid #334155;
  border-bottom: 1px solid var(--border-color, #334155);
  padding: 10px 20px;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  align-items: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  justify-content: space-between;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  position: relative;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  align-items: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 10px;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  -webkit-box-align: center;
  justify-content: center;
  -webkit-box-pack: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-sub {
  font-size: 11px;
  color: #94a3b8;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Machine Identifier Widget */
.machine-pill {
  background-color: #1e293b;
  background-color: var(--bg-card, #1e293b);
  border: 1px solid #334155;
  border: 1px solid var(--border-color, #334155);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  -webkit-box-align: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-transition: all 0.2s ease;
}

.machine-pill:hover {
  background-color: #283548;
  border-color: #3b82f6;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-dot.idle {
  background-color: #f59e0b;
}

.status-dot.offline {
  background-color: #64748b;
}

.header-actions {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  -webkit-box-align: center;
  gap: 12px;
}

/* Navigation Tabs */
.nav-bar {
  background-color: #0f172a;
  background-color: var(--bg-sidebar, #0f172a);
  border-bottom: 1px solid #334155;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-tab {
  padding: 12px 18px;
  color: #94a3b8;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  -webkit-box-align: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: #f8fafc;
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: #3b82f6;
  color: var(--primary, #3b82f6);
  border-bottom-color: #3b82f6;
  font-weight: 600;
}

.tab-badge {
  background-color: #ef4444;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Main Content Area */
.main-content {
  flex: 1;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  padding: 20px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* Card Component */
.card {
  background-color: #1e293b;
  background-color: var(--bg-card, #1e293b);
  border: 1px solid #334155;
  border: 1px solid var(--border-color, #334155);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  -webkit-box-align: center;
  justify-content: space-between;
  -webkit-box-pack: justify;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  align-items: center;
  -webkit-box-align: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  -webkit-transition: all 0.15s ease;
  text-decoration: none;
  color: #fff;
}

.btn:hover {
  opacity: 0.92;
}

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

.btn-primary {
  background-color: #3b82f6;
  background-color: var(--primary, #3b82f6);
  border-color: #2563eb;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-success {
  background-color: #10b981;
  background-color: var(--success, #10b981);
}

.btn-warning {
  background-color: #f59e0b;
  color: #111;
}

.btn-danger {
  background-color: #ef4444;
}

.btn-secondary {
  background-color: #334155;
  border-color: #475569;
  color: #f8fafc;
}

.btn-secondary:hover {
  background-color: #475569;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #94a3b8;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background-color: #0b1120;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 9px 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* File Explorer Specific Styles */
.file-toolbar {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  background-color: #162032;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #334155;
}

.location-bar {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  -webkit-box-flex: 1;
  min-width: 250px;
}

.quick-links {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-link-btn {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #94a3b8;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.quick-link-btn.active, .quick-link-btn:hover {
  background-color: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.breadcrumb-trail {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
  padding: 4px 0;
}

.breadcrumb-item {
  color: #3b82f6;
  cursor: pointer;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #64748b;
}

/* Dropzone */
.dropzone {
  border: 2px dashed #475569;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background-color: rgba(30, 41, 59, 0.4);
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.08);
}

.dropzone-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

/* File Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.file-table th {
  background-color: #162032;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 1px solid #334155;
}

.file-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #283548;
  font-size: 13px;
}

.file-row:hover td {
  background-color: #243044;
}

.file-name-cell {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}

.file-name-cell:hover {
  color: #3b82f6;
}

.file-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.file-actions {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  gap: 6px;
  justify-content: flex-end;
}

/* Network Grid */
.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.station-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 18px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.station-card:hover {
  border-color: #475569;
  transform: translateY(-2px);
}

.station-header {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.station-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background-color: #0f172a;
  border: 1px solid #334155;
}

.station-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.station-os {
  font-size: 12px;
  color: #94a3b8;
}

.station-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.station-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #334155;
  display: flex;
  gap: 8px;
}

/* Chat Layout */
.chat-container {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  height: 600px;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  background-color: #162032;
}

.chat-sidebar {
  width: 240px;
  background-color: #0f172a;
  border-right: 1px solid #334155;
  padding: 14px;
  overflow-y: auto;
}

.chat-channel-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  color: #94a3b8;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-channel-item.active, .chat-channel-item:hover {
  background-color: #1e293b;
  color: #fff;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #131b2e;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  background-color: #1e293b;
  border: 1px solid #334155;
  position: relative;
}

.chat-bubble.own {
  align-self: flex-end;
  background-color: #1e3a8a;
  border-color: #2563eb;
}

.chat-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.chat-text {
  font-size: 13px;
  color: #f8fafc;
  word-break: break-word;
}

.chat-attachment-box {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-input-bar {
  padding: 14px;
  border-top: 1px solid #334155;
  background-color: #0f172a;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Webmail Layout */
.mail-container {
  display: flex;
  height: 650px;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  background-color: #162032;
}

.mail-sidebar {
  width: 260px;
  background-color: #0f172a;
  border-right: 1px solid #334155;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mail-folder-item {
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s;
}

.mail-folder-item.active, .mail-folder-item:hover {
  background-color: #1e293b;
  color: #fff;
}

.mail-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #131b2e;
  overflow: hidden;
}

.mail-list {
  flex: 1;
  overflow-y: auto;
}

.mail-item {
  padding: 14px 18px;
  border-bottom: 1px solid #243044;
  cursor: pointer;
  transition: background-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mail-item:hover {
  background-color: #1c273c;
}

.mail-item.unread {
  background-color: #192338;
  border-left: 3px solid #3b82f6;
}

.mail-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.mail-from {
  font-weight: 600;
  color: #f1f5f9;
}

.mail-date {
  font-size: 11px;
  color: #94a3b8;
}

.mail-subject {
  font-size: 13px;
  color: #cbd5e1;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-dialog {
  background-color: #1e293b;
  border: 1px solid #475569;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  padding: 24px;
}

.modal-dialog.lg {
  max-width: 850px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

/* Badges & Alerts */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-legacy {
  background-color: #3b82f6;
  color: #fff;
}

.badge-secure {
  background-color: #10b981;
  color: #fff;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.alert-error {
  background-color: #451a1a;
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.alert-success {
  background-color: #064e3b;
  border: 1px solid #10b981;
  color: #6ee7b7;
}

/* Login Page Styles */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b1120 70%);
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.login-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-circle {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 12px;
  color: #94a3b8;
}

.login-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #334155;
  text-align: center;
}

.system-badge-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.login-hint {
  font-size: 11px;
  color: #64748b;
}

/* Preview Modal Elements */
.preview-img-container {
  max-height: 480px;
  text-align: center;
  overflow: hidden;
  background-color: #0b1120;
  border-radius: 8px;
  padding: 10px;
}

.preview-img {
  max-width: 100%;
  max-height: 450px;
  object-fit: contain;
}

.preview-text-box {
  background-color: #0b1120;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  color: #e2e8f0;
  font-family: monospace, Courier, monospace;
  font-size: 12px;
  max-height: 450px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================================================
   Dual-Panel (Total Commander) & Drag-Drop Styles
   ========================================================================== */

.dual-panel-container {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

.dual-panel {
  flex: 1;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  min-width: 0;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dual-panel-header {
  padding: 12px 16px;
  background-color: #162032;
  border-bottom: 1px solid #334155;
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dual-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dual-panel-body {
  flex: 1;
  -webkit-box-flex: 1;
  overflow-y: auto;
  max-height: 520px;
  min-height: 320px;
}

.transfer-controls-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.btn-transfer-arrow {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 100px;
}

/* Drag and Drop Visual States */
tr.file-row[draggable="true"] {
  cursor: grab;
}

tr.file-row.dragging {
  opacity: 0.4;
  background-color: #3b82f6 !important;
}

.dropzone-target-active {
  border: 2px dashed #3b82f6 !important;
  background-color: rgba(59, 130, 246, 0.12) !important;
}

/* File Manager Item Selection Colors */
.file-row {
  cursor: pointer;
  transition: background-color 0.15s, outline 0.15s, box-shadow 0.15s;
}

.file-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Unmistakable selection color - Left Panel (Local Station / Blue) */
#panel-left .file-row.selected {
  background-color: rgba(37, 99, 235, 0.32) !important;
  outline: 2px solid #3b82f6 !important;
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.5) !important;
}

/* Unmistakable selection color - Right Panel (Compartidos / Orange) */
#panel-right .file-row.selected {
  background-color: rgba(234, 88, 12, 0.32) !important;
  outline: 2px solid #f97316 !important;
  box-shadow: inset 0 0 12px rgba(249, 115, 22, 0.5) !important;
}

.file-select-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0 4px;
  accent-color: #3b82f6;
}

#panel-right .file-select-checkbox {
  accent-color: #f97316;
}

/* Transfer Controls Enhancements */
.transfer-controls-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background-color: #0f172a;
  border-radius: 8px;
  border: 1px solid #1e293b;
  min-width: 130px;
}

.btn-cmd {
  width: 100%;
  font-weight: 700;
  font-size: 11px;
  padding: 8px 10px;
  text-align: center;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.15s;
}

.btn-cmd:hover {
  transform: translateY(-1px);
}

.btn-cmd:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Mail Accounts Organization Grid */
.mail-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.mail-group-card {
  background-color: #131d31;
  border: 1px solid #283955;
  border-top: 3px solid #10b981;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mail-group-header {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #283955;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mail-account-box {
  padding: 10px 12px;
  background-color: #0d1527;
  border: 1px solid #1e2d47;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.mail-account-box:hover {
  border-color: #38bdf8;
  background-color: #142038;
}

.mail-account-box.active {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   INICIO DASHBOARD (Inspired by Image 3 Style: Vibrant Blue, Orange, Green)
   ========================================================================== */
.inicio-hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

@media (max-width: 960px) {
  .inicio-hero-container {
    grid-template-columns: 1fr;
  }
}

.inicio-intro-card {
  background-color: #0b1120;
  border: 1px solid #1e293b;
  border-radius: 18px;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

.inicio-intro-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.inicio-headline {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.inicio-description {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.inicio-grid-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .inicio-grid-cards {
    grid-template-columns: 1fr;
  }
}

/* Image 3 vibrant cards */
.dashboard-tile {
  border-radius: 18px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 175px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
}

.dashboard-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.dashboard-tile-arrow {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 18px;
  opacity: 0.85;
  transition: transform 0.2s;
}

.dashboard-tile:hover .dashboard-tile-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Tile 1: Vibrant Electric Blue (Mis Archivos) */
.tile-blue {
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

/* Tile 2: Vibrant Energetic Orange (Mensajes) */
.tile-orange {
  background: linear-gradient(145deg, #ea580c, #f97316);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}

/* Tile 3: Vibrant Emerald Green (Webmail) */
.tile-green {
  background: linear-gradient(145deg, #059669, #10b981);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

/* Tile 4: Rich Violet (Accesos & Red) */
.tile-purple {
  background: linear-gradient(145deg, #4f46e5, #6366f1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.tile-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.tile-subtitle {
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.4;
}

/* Body layout wrapper (Supports horizontal top nav & vertical sidebar layout) */
.app-body-layout {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  flex-direction: column;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex: 1;
  min-height: calc(100vh - 65px);
  width: 100%;
}

/* ==========================================================================
   SIDEBAR LAYOUT MODE (Movable Menu Customization)
   ========================================================================== */
.app-container.sidebar-mode .app-header {
  display: flex !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-container.sidebar-mode .app-body-layout {
  flex-direction: row;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
}

.app-container.sidebar-mode .sidebar-top-bar {
  display: block !important;
}

.app-container.sidebar-mode .nav-bar {
  width: 250px;
  min-width: 250px;
  flex-direction: column;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  border-bottom: none;
  border-right: 1px solid #1e293b;
  padding: 12px 10px;
  gap: 8px;
  background-color: #0b1120;
  overflow-y: auto;
}

.app-container.sidebar-mode .nav-tab {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 14px;
}

.app-container.sidebar-mode .main-content {
  flex: 1;
  min-width: 0;
  padding: 24px;
}

/* When sidebar is collapsed */
.app-container.sidebar-mode.sidebar-collapsed .nav-bar {
  display: none !important;
}

/* Responsive adjustments for Tablets and Mobile Phones */
@media (max-width: 900px) {
  .dual-panel-container {
    flex-direction: column;
  }
  .transfer-controls-column {
    flex-direction: row;
    justify-content: center;
  }
  .app-container.sidebar-mode .app-body-layout {
    flex-direction: column;
  }
  .app-container.sidebar-mode .nav-bar {
    width: 100%;
    height: auto;
    flex-direction: row;
    position: static;
  }
}

@media (max-width: 650px) {
  .app-header {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand-title {
    font-size: 16px;
  }
  .brand-sub {
    font-size: 10px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .machine-pill {
    padding: 3px 8px;
  }
  .main-content {
    padding: 12px 10px;
  }
  .nav-bar {
    padding: 4px 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .nav-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  .btn {
    min-height: 38px;
  }
  .mobile-upload-card {
    padding: 12px !important;
  }
  .mobile-upload-card button {
    flex: 1 1 auto;
    justify-content: center;
  }
}


