/* ============================================================
   FileX — Industrial Skeuomorphic Theme
   Complete drop-in replacement for app.css
   Preserves all class names, adds immersive hardware aesthetic
   ============================================================ */

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

/* ===== DESIGN SYSTEM TOKENS ===== */
:root {
  /* Metal panel colors */
  --bg:           #b8b8b8;
  --bg-dark:      #141414;
  --panel:        #c6c6c6;
  --panel-light:  #d4d4d4;
  --panel-dark:   #181818;
  --recess:       #9e9e9e;
  --recess-dark:  #848484;
  --spec:         #f0f0f0;
  
  /* Accent colors */
  --red:          #cc2020;
  --red-glow:     rgba(204,32,32,0.5);
  --red-dim:      rgba(204,32,32,0.22);
  --cyan:         #00d4b8;
  --cyan-glow:    rgba(0,212,184,0.55);
  --green:        #2ed870;
  --green-glow:   rgba(46,216,112,0.55);
  --amber:        #e8a020;
  --amber-glow:   rgba(232,160,32,0.55);
  --blue:         #4090e0;
  --blue-glow:    rgba(64,144,224,0.55);
  
  /* Typography colors */
  --ink:          #1a1a1a;
  --ink-soft:     #3a3a3a;
  --ink-muted:    #585858;
  --label:        #585858;
  --label-light:  #787878;
  --label-dark:   #a0a0a0;
  --hi:           rgba(255,255,255,0.8);
  --shadow:       rgba(0,0,0,0.28);
  
  /* State colors */
  --error:        #cc2020;
  --success:      #2ed870;
  --border:       #9e9e9e;
  --border-strong:#848484;
  
  /* Typography */
  --font-d: 'Rajdhani', sans-serif;
  --font-m: 'Share Tech Mono', monospace;
  --font-c: 'Barlow Condensed', sans-serif;
  --font-body: 'DM Sans', 'Rajdhani', sans-serif;
}

/* ===== GLOBAL STYLES ===== */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 2px),
    repeating-linear-gradient(90deg,
      rgba(0,0,0,0.04) 0px,
      rgba(0,0,0,0.04) 1px,
      transparent 1px,
      transparent 40px);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Remove the old paper noise, replace with machined metal texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 99px; }

/* ===== TOP BAR (Metallic Navigation) ===== */
.topbar {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: linear-gradient(180deg, #e2e2e2 0%, #d0d0d0 18%, #c2c2c2 55%, #b4b4b4 100%);
  border-bottom: 1px solid #888;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    inset 0 2px 0 rgba(255,255,255,0.4),
    0 3px 0 rgba(0,0,0,0.18),
    0 4px 16px rgba(0,0,0,0.2);
}

/* Corner screws on topbar */
.topbar::before,
.topbar::after {
  content: '';
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e0e0e0 0%, #a8a8a8 45%, #787878 100%);
  box-shadow:
    inset 0 1px 1.5px rgba(255,255,255,0.75),
    inset 0 -1px 1px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,0,0,0.22),
    1px 1.5px 3px rgba(0,0,0,0.28);
  top: 50%;
  transform: translateY(-50%);
}
.topbar::before { left: 18px; }
.topbar::after { right: 18px; }

.topbar .brand {
  font-family: var(--font-d);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: transparent;
  background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 45%, #0c0c0c 55%, #2a2a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  text-decoration: none;
}
.topbar .brand i {
  color: var(--red);
  font-style: normal;
  background: linear-gradient(180deg, #e83030 0%, var(--red) 50%, #8a1010 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar nav a {
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  text-decoration: none;
  margin-left: 26px;
  transition: color 0.2s, background 0.2s;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.5));
}
.topbar nav a:hover { color: #222; background: rgba(0,0,0,0.07); border-radius: 3px; }
.topbar nav a.cta {
  background: linear-gradient(180deg, #e02828 0%, #aa1818 100%);
  padding: 8px 20px;
  border-radius: 4px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -1px 0 rgba(0,0,0,0.28), 0 2px 0 #6a0808;
}
.topbar nav a.cta:hover { transform: translateY(-1px); background: linear-gradient(180deg, #e83030 0%, #c01c1c 100%); }

/* ===== AUTH CARD (Metallic Panel) ===== */
.auth-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 86px);
  padding: 40px 20px;
}

.auth-card {
  position: relative;
  background: linear-gradient(160deg, #d4d4d4 0%, #c8c8c8 40%, #bababa 100%);
  border-radius: 12px;
  padding: 44px 48px;
  width: 100%;
  max-width: 480px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 3px 0 rgba(255,255,255,0.35),
    inset 1px 0 0 rgba(255,255,255,0.5),
    inset -1px 0 0 rgba(0,0,0,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 0 1px rgba(0,0,0,0.15),
    0 0 0 2px rgba(255,255,255,0.4),
    0 0 0 3px rgba(0,0,0,0.08),
    0 8px 32px rgba(0,0,0,0.22),
    0 2px 8px rgba(0,0,0,0.14);
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Auth card screws (4 corners) */
.auth-card::before,
.auth-card::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #d8d8d8 0%, #a0a0a0 50%, #787878 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.7), inset 0 -1px 1px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.18);
  z-index: 2;
}
.auth-card::before { top: 10px; left: 10px; }
.auth-card::after { top: 10px; right: 10px; }

.auth-card .corner-screw {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #d8d8d8 0%, #a0a0a0 50%, #787878 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.7), inset 0 -1px 1px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.18);
  z-index: 2;
}
.auth-card .corner-screw.bottom-left { bottom: 10px; left: 10px; }
.auth-card .corner-screw.bottom-right { bottom: 10px; right: 10px; }

/* Status LED on auth card */
.auth-card::before {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a0fff0 0%, var(--cyan) 60%, #008070 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), 0 0 0 1px rgba(0,0,0,0.2), 0 0 0 2px rgba(255,255,255,0.5), 0 0 8px var(--cyan-glow), 0 0 18px rgba(0,212,184,0.32);
  animation: ledBreath 3s ease-in-out infinite;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

@keyframes ledBreath {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.auth-card h1 {
  font-family: var(--font-d);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: transparent;
  background: linear-gradient(180deg, #444 0%, #222 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,0.7));
  margin-bottom: 8px;
}
.auth-card h1 i {
  color: var(--red);
  font-style: normal;
  background: linear-gradient(180deg, #e83030 0%, var(--red) 50%, #8a1010 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px var(--red-dim));
}

.auth-card .lead {
  font-family: var(--font-c);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.5));
  margin-bottom: 28px;
}

.auth-card .tagline {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--label-light);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.5));
  margin-bottom: 8px;
}

/* ===== FORM FIELDS (Recessed controls) ===== */
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-family: var(--font-c);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.5));
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(180deg, #9c9c9c 0%, #a8a8a8 100%);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,0.2),
    inset 0 0 0 1px rgba(0,0,0,0.15),
    0 1px 0 rgba(255,255,255,0.5);
  transition: all 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,0.2),
    inset 0 0 0 1px var(--red),
    0 0 0 2px rgba(204,32,32,0.3),
    0 1px 0 rgba(255,255,255,0.5);
}
.field .hint {
  margin-top: 6px;
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--label-light);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.4));
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
}

/* ===== BUTTONS (Industrial controls) ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 22px;
  border: none;
  border-radius: 6px;
  font-family: var(--font-c);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s;
  text-decoration: none;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.42) 0%, transparent 100%);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(180deg, #e02828 0%, #b01818 55%, #880e0e 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.28),
    0 4px 0 #6a0808,
    0 6px 14px rgba(0,0,0,0.28),
    0 0 18px var(--red-dim);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 5px 0 #6a0808,
    0 8px 22px rgba(0,0,0,0.28),
    0 0 28px var(--red-glow);
  background: linear-gradient(180deg, #e83030 0%, #c01c1c 55%, #9a1010 100%);
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.28), 0 1px 0 #6a0808;
}
.btn-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: linear-gradient(180deg, #d8d8d8 0%, #c4c4c4 50%, #b8b8b8 100%);
  color: var(--label);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    inset 0 -1px 0 rgba(0,0,0,0.14),
    0 3px 0 #909090,
    0 5px 12px rgba(0,0,0,0.18);
}
.btn-ghost:hover {
  color: #222;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 4px 0 #909090,
    0 7px 18px rgba(0,0,0,0.22);
}
.btn-ghost:active {
  transform: translateY(2px);
  background: linear-gradient(180deg, #b8b8b8, #c4c4c4);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.14), 0 1px 0 #909090;
}

/* ===== AUTH FOOTER ===== */
.auth-foot {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(0,0,0,0.1);
  position: relative;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: center;
}
.auth-foot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55) 25%, rgba(255,255,255,0.55) 75%, transparent);
}
.auth-foot a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.auth-foot a:hover { color: var(--red); }

.aux-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-c);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-decoration: none;
}
.aux-link:hover { color: var(--red); }

/* ===== STATUS MESSAGES ===== */
.msg {
  padding: 12px 16px;
  border-radius: 6px;
  font-family: var(--font-c);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.1);
}
.msg.show { display: block; }
.msg.error {
  background: linear-gradient(180deg, #f5e0e0, #e8c8c8);
  color: var(--error);
  border-left: 3px solid var(--error);
}
.msg.success {
  background: linear-gradient(180deg, #d8f0e0, #c0e4cc);
  color: var(--success);
  border-left: 3px solid var(--success);
}
.msg.info {
  background: linear-gradient(180deg, #e0e4e8, #d0d4d8);
  color: var(--ink-soft);
  border-left: 3px solid var(--cyan);
}

/* ===== DASHBOARD SPECIFIC ELEMENTS ===== */
/* These maintain compatibility with your dashboard HTML while adding FileX style */

.dashboard-container {
  position: relative;
  z-index: 10;
  padding: 32px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Dashboard cards (replaces any .card classes) */
.card,
.order-card,
.file-card {
  position: relative;
  background: linear-gradient(160deg, #d4d4d4 0%, #c8c8c8 40%, #bababa 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 0 0 1px rgba(0,0,0,0.15),
    0 0 0 2px rgba(255,255,255,0.4),
    0 8px 24px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover,
.order-card:hover,
.file-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 0 0 1px rgba(0,0,0,0.15),
    0 0 0 2px rgba(255,255,255,0.45),
    0 12px 32px rgba(0,0,0,0.25);
}

/* Table styling for order history */
table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(180deg, #d0d0d0, #c0c0c0);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 8px rgba(0,0,0,0.1);
}
th {
  font-family: var(--font-c);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 16px;
  background: linear-gradient(180deg, #b8b8b8, #a8a8a8);
  color: var(--label);
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
td {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  color: var(--ink);
}

/* File upload zone (for upload.html) */
.upload-zone {
  position: relative;
  background: linear-gradient(180deg, #c8c8c8, #b8b8b8);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  border: 2px dashed var(--recess-dark);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.1);
  transition: all 0.2s;
  cursor: pointer;
}
.upload-zone:hover {
  border-color: var(--red);
  background: linear-gradient(180deg, #d0d0d0, #c0c0c0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 0 0 2px rgba(204,32,32,0.2);
}
.upload-zone.dragover {
  border-color: var(--cyan);
  background: linear-gradient(180deg, #d8e8e8, #c8d8d8);
}

/* Badge/pill styling */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-family: var(--font-m);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #e8e8e8, #d0d0d0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 1px rgba(0,0,0,0.1);
  color: var(--ink-muted);
}
.badge-success {
  background: linear-gradient(180deg, #c8e8d8, #a8d4bc);
  color: #0a5c2e;
}
.badge-warning {
  background: linear-gradient(180deg, #f0e0b8, #e0cc98);
  color: #8a6010;
}
.badge-danger {
  background: linear-gradient(180deg, #e8c0c0, #d4a8a8);
  color: var(--red);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .topbar { padding: 14px 24px; flex-wrap: wrap; gap: 12px; }
  .topbar nav a { margin-left: 16px; font-size: 12px; }
  .auth-card { padding: 32px 28px; margin: 0 16px; }
  .dashboard-container { padding: 20px 24px; }
  .card, .order-card, .file-card { padding: 18px; }
  table, th, td { font-size: 12px; }
  th, td { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .topbar { flex-direction: column; text-align: center; }
  .topbar nav a { margin: 0 12px; }
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 28px; }
  .btn { padding: 12px 18px; font-size: 11px; }
  .upload-zone { padding: 32px 20px; }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }