:root {
  --purple-main: #7C3AED;
  --purple-hover: #6D28D9;
  --purple-light: #F3E8FF;
  --purple-border: #EDE9FE;
  --text-dark: #0F172A;
  --text-navy: #1E293B;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --bg-page: #F4F5F9;
  --border-light: #F1F5F9;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TOP HEADER
   ============================================================ */
.app-header {
  height: 56px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.icon-menu-btn:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text-dark);
}

.sub-name {
  color: var(--purple-main);
  font-weight: 600;
}

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

.header-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s;
}

.header-icon-btn:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.notif-wrapper {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #EF4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple-light);
  color: var(--purple-main);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   SECONDARY NAVIGATION (TABS)
   ============================================================ */
.sub-nav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 8px 24px;
}

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

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.tab-btn.active {
  background: var(--purple-light);
  color: var(--purple-main);
  font-weight: 700;
}

/* ============================================================
   MAIN WRAPPER & SIGN IN CARD
   ============================================================ */
.main-wrapper {
  flex: 1;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#view-target {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 32px 24px 32px;
}

.signin-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.badge-tag {
  background: var(--purple-light);
  color: var(--purple-main);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 16px;
}

.signin-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.signin-sub {
  font-size: 13.5px;
  color: var(--text-subtle);
  margin-bottom: 24px;
  line-height: 1.4;
}

#login-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-navy);
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  background: #FAFAFC;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--text-dark);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.input-group input:focus {
  border-color: var(--purple-main);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(124, 58, 237, 0.1);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: -4px;
}

.remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--purple-main);
  cursor: pointer;
}

#login-submit {
  background: linear-gradient(135deg, var(--purple-main), var(--purple-hover));
  color: #ffffff;
  border: none;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  transition: transform 0.12s, box-shadow 0.12s;
  width: 100%;
}

#login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

#login-submit:active {
  transform: translateY(0);
}

/* --- Credential Hint Box (Right after Sign in button) --- */
.cred-hint-box {
  background: var(--purple-light);
  border: 1px solid var(--purple-border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--purple-hover);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cred-hint-icon {
  font-size: 15px;
}

.cred-text {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cred-text .lbl {
  color: var(--purple-hover);
  font-weight: 600;
}

.code-pill {
  background: #ffffff;
  border: 1px solid #DDD6FE;
  color: var(--purple-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.status {
  font-size: 13px;
  color: #EF4444;
  min-height: 16px;
  font-weight: 500;
}

/* Dashboard View */
.dashboard-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-panel h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
}

.dashboard-field {
  font-size: 14px;
  padding: 10px 14px;
  background: #FAFAFC;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.dashboard-field .k {
  color: var(--text-muted);
  display: inline-block;
  width: 90px;
  font-weight: 600;
}

.flag-box {
  margin-top: 8px;
  padding: 12px 14px;
  background: #0F172A;
  color: #FBBF24;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  word-break: break-all;
}

button.secondary {
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

button.secondary:hover {
  background: var(--border-light);
}

.hidden {
  display: none !important;
}

/* ============================================================
   ATTACKER TOOLKIT VIEW STYLES
   ============================================================ */
.toolkit-shell {
  width: 100%;
  max-width: 100%;
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolkit-sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.toolkit-head-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.toolkit-head-tag {
  background: #E2E8F0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 12px;
}

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

.toolkit-tool-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.toolkit-tool-tab:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.toolkit-tool-tab.active {
  background: var(--purple-main);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.toolkit-panel {
  display: flex;
  flex-direction: column;
}

.panel-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.panel-section-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.log-table-wrapper {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.log-table-header {
  background: #F8FAFC;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 50px 100px 1fr 90px 110px 150px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-light);
}

.empty-log-box {
  padding: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.empty-icon {
  margin-bottom: 6px;
}

.empty-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.empty-sub {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-subtle);
}

.log-row {
  padding: 12px 24px;
  display: grid;
  grid-template-columns: 50px 100px 1fr 90px 110px 150px;
  font-size: 13px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
}

.log-row:hover {
  background: #FAFAFC;
}

.col-num {
  font-family: ui-monospace, monospace;
  color: var(--text-subtle);
}

.col-method {
  font-weight: 800;
  font-family: ui-monospace, monospace;
  color: var(--purple-main);
}

.col-url {
  color: var(--text-dark);
  font-family: ui-monospace, monospace;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.col-status {
  font-weight: 700;
  font-family: ui-monospace, monospace;
  color: #10B981;
}

.col-time {
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
  font-size: 12px;
}

.col-action-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.col-size {
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
  font-size: 12px;
}

.row-send-repeater-btn {
  background: var(--purple-light);
  color: var(--purple-main);
  border: 1px solid var(--purple-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.row-send-repeater-btn:hover {
  background: var(--purple-main);
  color: #ffffff;
  border-color: var(--purple-main);
}

/* Right-Click Context Menu */
.toolkit-context-menu {
  position: fixed;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  z-index: 9999;
  min-width: 180px;
  padding: 6px 0;
  overflow: hidden;
}

.toolkit-context-item {
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.12s, color 0.12s;
}

.toolkit-context-item:hover {
  background: var(--purple-light);
  color: var(--purple-main);
}

.toolkit-context-shortcut {
  font-size: 11px;
  color: var(--text-subtle);
  font-family: ui-monospace, monospace;
}

/* Repeater & Password Cracker */
.repeater-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}

#repeater-tabs-bar {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.repeater-tab {
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-bottom: none;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px 6px 0 0;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.repeater-tab.active {
  background: #ffffff;
  color: var(--purple-main);
  font-weight: 700;
  border-top: 2.5px solid var(--purple-main);
}

.repeater-tab-x {
  color: var(--text-subtle);
  margin-left: 8px;
}

.repeater-tab-x:hover {
  color: #EF4444;
}

.toolkit-send-btn {
  background: var(--purple-main);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.toolkit-send-btn:hover {
  background: var(--purple-hover);
}

.toolkit-btn-secondary {
  background: var(--border-light);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
}

.repeater-columns {
  display: flex;
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.repeater-col {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Dark Background for Response Column in Repeater */
.repeater-col.response-col-dark {
  background: #0F172A !important;
}

.repeater-col-header {
  background: #FAFAFC;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}

.repeater-col-header.dark-header {
  background: #1E293B !important;
  color: #94A3B8 !important;
  border-bottom: 1px solid #334155 !important;
}

.toolkit-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  border: none;
  outline: none;
  resize: none;
  padding: 12px;
  height: 400px;
  width: 100%;
  box-sizing: border-box;
}

textarea.toolkit-mono {
  color: var(--text-dark);
}

pre.toolkit-mono.response-dark-mono {
  margin: 0;
  overflow-y: auto;
  background: #0F172A !important;
  color: #38BDF8 !important;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Password Cracker */
#toolkit-panel-cracker {
  padding: 0;
}

.cracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.cracker-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cracker-icon {
  font-size: 26px;
}

.cracker-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.cracker-subtitle {
  font-size: 12px;
  color: #94A3B8;
}

.cracker-badge {
  background: rgba(255,255,255,0.1);
  color: #A78BFA;
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  font-family: monospace;
}

.cracker-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cracker-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.cracker-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 14px;
}

.cracker-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}

.cracker-card-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.cracker-mono {
  display: block;
  width: 100%;
  background: #ffffff;
  color: var(--text-dark);
  border: none;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: none;
  box-sizing: border-box;
}

.cracker-wordlist {
  height: 240px;
}

.cracker-hash-input {
  height: 64px;
}

.cracker-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cracker-run-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--purple-main), var(--purple-hover));
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

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

.cracker-status {
  font-size: 12px;
  min-height: 16px;
  color: var(--text-muted);
}

.cracker-result-input {
  color: #10B981;
  background: #F0FDF4;
  height: 56px;
  font-weight: 700;
}
