/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}
input, select, textarea, button { font-family: inherit; }

/* ===== LOGIN ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #16213e 0%, #1a1a2e 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header h1 { font-size: 2rem; font-weight: 700; color: #fff; }
.login-header .hl { color: #ff6b00; }
.login-header p { color: rgba(255,255,255,0.5); font-size: 0.875rem; margin-top: 0.25rem; }
.login-footer { text-align: center; margin-top: 1.5rem; color: rgba(255,255,255,0.3); font-size: 0.75rem; }

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

.form-group { margin-bottom: 1rem; }
.form-group label, .field-label { display: block; margin-bottom: 0.25rem; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.form-group input, .form-group textarea, .form-group select,
.select-field {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus,
.select-field:focus {
  outline: none;
  border-color: #ff6b00;
}
.form-group select option, .select-field option {
  background: #1a1a2e;
  color: #e2e8f0;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.remember-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
  cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #ff6b00; color: white; }
.btn-primary:hover:not(:disabled) { background: #e05e00; }
.btn-success { background: linear-gradient(135deg, #11998e, #38ef7d); color: white; }
.btn-secondary { background: rgba(255,255,255,0.08); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.12); }
.btn-danger { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.3); }
.btn-block { display: block; width: 100%; padding: 0.75rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* ===== APP LAYOUT ===== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.top-left { display: flex; align-items: center; gap: 0.5rem; }
.top-right { display: flex; align-items: center; gap: 0.75rem; }
#agentName { font-weight: 600; font-size: 0.9rem; }
.sip-status { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}
.status-dot.registered { background: #10b981; }
.status-dot.connecting { background: #f59e0b; animation: blink 1s infinite; }
.status-dot.in-call, .status-dot.calling, .status-dot.ringing { background: #f97316; animation: blink 0.5s infinite; }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.mos-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
}
.mos-badge.warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.mos-badge.bad { background: rgba(239,68,68,0.15); color: #fca5a5; }

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: rgba(239,68,68,0.4); color: #fca5a5; }

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.tab:hover { color: rgba(255,255,255,0.7); }
.tab.active { color: #ff6b00; border-bottom-color: #ff6b00; }

/* Tab content */
.tab-content { flex: 1; overflow-y: auto; }
.tab-pane { display: none; padding: 1rem; }
.tab-pane.active { display: block; }

/* ===== DIALPAD ===== */
.number-display {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 0.25rem;
  margin-bottom: 1rem;
}
.number-display input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.75rem;
  color: white;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-align: center;
}
.number-display input:focus { outline: none; }
.number-display input::placeholder { color: rgba(255,255,255,0.25); font-size: 0.9rem; }
.btn-clear {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 1.2rem;
  width: 32px; height: 32px;
  cursor: pointer;
  margin-right: 0.25rem;
}

.dialpad { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.dialpad-row { display: flex; justify-content: center; gap: 0.5rem; }
.dkey {
  width: 72px; height: 54px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.12s;
}
.dkey:hover { background: rgba(255,255,255,0.12); }
.dkey:active { transform: scale(0.95); background: rgba(255,107,0,0.2); }
.dkey .digit { font-size: 1.25rem; font-weight: 500; line-height: 1; }
.dkey .letters { font-size: 0.55rem; color: rgba(255,255,255,0.35); letter-spacing: 2px; margin-top: 2px; }

.dkey.sm { width: 56px; height: 42px; border-radius: 8px; font-size: 1rem; }
.dialpad-row.sm { gap: 0.4rem; }
.dtmf-pad { margin-bottom: 1rem; }

.btn-call {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #11998e, #38ef7d);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-call:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(56,239,125,0.25); transform: translateY(-1px); }
.btn-call:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== IN-CALL ===== */
.call-info { text-align: center; padding: 1.5rem 0; }
.call-number { font-size: 1.5rem; font-weight: 600; color: white; letter-spacing: 1px; }
.call-state { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-top: 0.25rem; }
.call-timer {
  font-size: 2rem; font-weight: 300; color: #38ef7d;
  margin-top: 0.75rem; font-variant-numeric: tabular-nums;
}

.call-controls { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.ctrl-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.1); }
.ctrl-btn.active { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.ctrl-icon { font-size: 1.1rem; font-weight: 600; }

.btn-hangup {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-hangup:hover { box-shadow: 0 6px 20px rgba(245,87,108,0.3); }

/* ===== INCOMING CALL ===== */
.incoming-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 0.75rem;
  animation: incomingPulse 1.5s ease-in-out infinite;
}
@keyframes incomingPulse {
  0%, 100% { background: transparent; }
  50% { background: rgba(56,239,125,0.06); }
}
.incoming-icon {
  font-size: 3rem;
  animation: ringShake 0.4s ease-in-out infinite;
}
@keyframes ringShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}
.incoming-label {
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.incoming-caller {
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
}
.incoming-actions {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}
.btn-accept {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #38ef7d, #11998e);
  color: #fff;
  transition: all 0.2s;
}
.btn-accept:hover { box-shadow: 0 6px 20px rgba(56,239,125,0.3); transform: translateY(-1px); }
.btn-reject {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #f5576c, #ff4757);
  color: #fff;
  transition: all 0.2s;
}
.btn-reject:hover { box-shadow: 0 6px 20px rgba(245,87,108,0.3); transform: translateY(-1px); }

/* ===== CAMPAIGN ===== */
#campaignSelect { margin-bottom: 0.75rem; }
#queueSelect { margin-bottom: 0.75rem; }

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.stat-item {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
}
.stat-item .sv { font-weight: 600; color: #fff; }

.contact-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.contact-header {
  padding: 0.5rem 0.75rem;
  background: rgba(255,107,0,0.1);
  border-bottom: 1px solid rgba(255,107,0,0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff6b00;
}
.contact-fields { padding: 0.75rem; }
.contact-field {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.825rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.contact-field:last-child { border-bottom: none; }
.contact-field .cf-label { color: rgba(255,255,255,0.45); }
.contact-field .cf-value { color: #e2e8f0; font-weight: 500; }
.contact-field .cf-value.phone { color: #38ef7d; font-family: monospace; }

.contact-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.contact-actions .btn { flex: 1; text-align: center; }

.empty-msg { text-align: center; color: rgba(255,255,255,0.35); padding: 2rem 1rem; font-size: 0.85rem; }

.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

/* Callbacks */
.callbacks-list { display: flex; flex-direction: column; gap: 0.4rem; }
.cb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
}
.cb-info { display: flex; gap: 0.75rem; color: rgba(255,255,255,0.6); }
.cb-name { color: #e2e8f0; font-weight: 500; }
.cb-time { color: #fbbf24; }
.cb-btn {
  background: rgba(255,107,0,0.15);
  border: 1px solid rgba(255,107,0,0.25);
  color: #ff6b00;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* ===== RESULT DIALOG ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-box {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #1e293b, #1a1a2e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.modal-header {
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 600;
  font-size: 0.95rem;
}
.modal-body { padding: 1rem; }
.modal-footer { padding: 0.75rem 1rem; border-top: 1px solid rgba(255,255,255,0.06); display: flex; gap: 0.5rem; }
.modal-footer .btn { flex: 1; padding: 0.75rem; text-align: center; }
.btn-recall { background: rgba(59,130,246,0.2); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.btn-recall:hover:not(:disabled) { background: rgba(59,130,246,0.35); }

.result-contact {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.result-contact .rc-name { font-weight: 600; font-size: 1rem; }
.result-contact .rc-phone { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-top: 0.15rem; }
.result-contact .rc-dur { color: #38ef7d; font-size: 0.8rem; margin-top: 0.25rem; }

.result-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.rbtn {
  flex: 1;
  min-width: calc(33% - 0.4rem);
  padding: 0.5rem 0.25rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.rbtn:hover { background: rgba(255,255,255,0.08); }
.rbtn.selected { border-width: 2px; }
.rbtn.selected.answered { border-color: #10b981; background: rgba(16,185,129,0.15); color: #6ee7b7; }
.rbtn.selected.voicemail { border-color: #8b5cf6; background: rgba(139,92,246,0.15); color: #c4b5fd; }
.rbtn.selected.no_answer { border-color: #f59e0b; background: rgba(245,158,11,0.15); color: #fbbf24; }
.rbtn.selected.call_later { border-color: #3b82f6; background: rgba(59,130,246,0.15); color: #93c5fd; }
.rbtn.selected.do_not_call { border-color: #ef4444; background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ===== HISTORY ===== */
.history-list { display: flex; flex-direction: column; gap: 0.3rem; }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.825rem;
}
.history-item:hover { background: rgba(255,255,255,0.06); }
.hi-dir { width: 20px; text-align: center; }
.hi-dir.outgoing { color: #38ef7d; }
.hi-dir.incoming { color: #3b82f6; }
.hi-dir.missed { color: #ef4444; }
.hi-number { flex: 1; margin-left: 0.5rem; font-weight: 500; }
.hi-dur { color: rgba(255,255,255,0.4); font-size: 0.75rem; margin: 0 0.5rem; }
.hi-time { color: rgba(255,255,255,0.35); font-size: 0.7rem; }

/* ===== SETTINGS ===== */
.sip-info {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.825rem;
}
.sip-info div { padding: 0.25rem 0; }
.sip-info .lbl { color: rgba(255,255,255,0.4); }
.hint { font-size: 0.75rem; color: rgba(255,255,255,0.3); margin-top: 0.5rem; }

/* ===== SPINNER ===== */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== QUEUE + CAMPAIGN SECTIONS ===== */
.queue-select-row { display: flex; align-items: center; gap: 0.5rem; }
.queue-select-row .select-field { flex: 1; min-width: 120px; }
.queue-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
.campaign-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: rgba(255,107,0,0.15);
  color: #ff6b00;
  margin-left: 0.5rem;
}
.campaign-tag:empty { display: none; }
.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0.75rem 0;
}

/* ===== SERVER MODE ===== */
.btn-lg { padding: 0.875rem; font-size: 1rem; }
#queueWaiting { text-align: center; padding: 2rem 0; }
.waiting-icon { font-size: 3rem; animation: waitPulse 2s ease-in-out infinite; }
.waiting-text { font-size: 1.1rem; color: #e2e8f0; margin: 1rem 0 0.5rem; }
#queueStats { display: flex; justify-content: center; gap: 2rem; margin-top: 0.75rem; }
.qs-item { color: #94a3b8; font-size: 0.85rem; }
.qs-item b { color: #38ef7d; font-weight: 600; }

/* Pause/Break controls */
.pause-control { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; justify-content: center; }
.pause-select { max-width: 160px; font-size: 0.8rem; padding: 0.4rem 0.5rem; }
.btn-warning {
  background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3);
  border-radius: 6px; padding: 0.35rem 0.75rem; font-size: 0.8rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-warning:hover { background: rgba(245,158,11,0.25); }
.btn-warning:disabled { opacity: 0.5; cursor: not-allowed; }
.paused-banner {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  margin-top: 1rem; padding: 0.6rem 1rem; border-radius: 8px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
}
#pausedReason { color: #fbbf24; font-size: 0.85rem; font-weight: 600; }
.pause-timer {
  color: #fbbf24; font-size: 0.9rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@keyframes waitPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}
#serverContact { margin-top: 1rem; }
.server-call-timer {
  float: right;
  font-size: 1rem;
  font-weight: 700;
  color: #38ef7d;
  font-variant-numeric: tabular-nums;
  animation: timerPulse 1s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Custom dispositions (server mode result dialog) */
#customDispositions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.disp-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.disp-btn:hover { background: rgba(255,255,255,0.08); }
.disp-btn.selected { border-color: #ff6b00; background: rgba(255,107,0,0.15); color: #ff6b00; }
.custom-disps { flex-direction: row; flex-wrap: wrap; }
.rbtn.custom-disp { border-radius: 16px; border-width: 1.5px; font-size: 0.8rem; }
.rbtn.custom-disp.selected { border-width: 2px; }
.disp-divider { width: 100%; text-align: center; font-size: 0.7rem; color: rgba(255,255,255,0.35); margin: 0.4rem 0 0.2rem; }

/* Dynamic form fields */
#formFields { margin-bottom: 0.75rem; }
.ff-group { margin-bottom: 0.6rem; }
.ff-group label { display: block; font-size: 0.8rem; color: #94a3b8; margin-bottom: 0.2rem; }
.ff-group input, .ff-group select, .ff-group textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  font-size: 0.85rem;
}
.ff-group input:focus, .ff-group select:focus, .ff-group textarea:focus {
  outline: none;
  border-color: #ff6b00;
}

/* ===== TRANSFER ===== */
.transfer-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.75rem;
  margin: 0.75rem 0;
}
.transfer-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem; font-size: 0.85rem; color: #94a3b8;
}
.transfer-header .close-btn {
  background: transparent; border: none; color: #94a3b8;
  cursor: pointer; font-size: 1.2rem; padding: 0 0.25rem;
}
.transfer-tabs { display: flex; gap: 0; margin-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.ttab {
  flex: 1; padding: 0.4rem; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: #94a3b8;
  cursor: pointer; font-size: 0.8rem; transition: all 0.15s;
}
.ttab:hover { color: #e2e8f0; }
.ttab.active { color: #ff6b00; border-bottom-color: #ff6b00; }
.transfer-list { max-height: 200px; overflow-y: auto; }
.transfer-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
}
.transfer-item:hover { background: rgba(255,255,255,0.03); }
.transfer-item.offline { opacity: 0.4; }
.transfer-item .t-info { display: flex; flex-direction: column; }
.transfer-item .t-name { font-size: 0.85rem; color: #e2e8f0; }
.transfer-item .t-ext { font-size: 0.7rem; color: #64748b; font-family: monospace; }
.transfer-item .t-status {
  font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 6px;
  background: rgba(255,60,60,0.15); color: #f66;
}
.transfer-item .t-status.online { background: rgba(0,200,80,0.15); color: #0c8; }
.btn-transfer-do {
  padding: 0.3rem 0.6rem; font-size: 0.75rem; border: none; border-radius: 6px;
  background: rgba(0,200,80,0.2); color: #0c8; cursor: pointer;
}
.btn-transfer-do:hover { background: rgba(0,200,80,0.35); }
.btn-transfer-do:disabled { opacity: 0.4; cursor: not-allowed; }
.transfer-empty { text-align: center; padding: 1rem; color: #64748b; font-size: 0.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .dkey { width: 64px; height: 48px; }
  .dkey .digit { font-size: 1.1rem; }
}
