/* AD Export International Barcode Management Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-main: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1c263b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(245, 158, 11, 0.4);
  
  --primary-accent: #f59e0b; /* Safety Amber */
  --primary-hover: #d97706;
  --safety-yellow: #eab308;
  --cyan-accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f97316;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  --sidebar-width: 260px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.2);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography & Links */
a {
  color: var(--primary-accent);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--safety-yellow);
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Layout */
.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.brand-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-accent), #b45309);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--primary-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.nav-menu {
  padding: 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;

}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 10px 14px 4px 14px;
  font-weight: 700;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid var(--primary-accent);
}
.nav-link.active {
  color: var(--primary-accent);
}

.user-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-accent);
  font-weight: 700;
}

.user-details h5 {
  font-size: 0.85rem;
  font-weight: 600;
}
.user-details span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
}

.top-navbar {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(21, 28, 44, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.content-body {
  padding: 30px;
  flex: 1;
}

/* Dashboard Cards & Grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
}

.stat-info h3 {
  font-size: 1.8rem;
  margin-top: 4px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--primary-accent); }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan-accent); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.icon-orange { background: rgba(249, 115, 22, 0.15); color: var(--warning); }

/* Custom UI Cards & Containers */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 25px;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  padding: 24px;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: #0d121f;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-accent);
  box-shadow: var(--shadow-glow);
}

.input-mono {
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* Badges & Tables */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-cyan { background: rgba(6, 182, 212, 0.2); color: #7dd3fc; border: 1px solid rgba(6, 182, 212, 0.4); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }

.table-responsive {
  overflow-x: auto;
}

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

.table th {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: var(--bg-card-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-hover));
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #b45309);
  transform: translateY(-1px);
  color: var(--text-dark);
}

.btn-secondary {
  background: #1e293b;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #334155;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* Login Screen Layout */
.login-body {
  background: radial-gradient(circle at top right, #1e1b4b, #0b0f19 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(21, 28, 44, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Print Specific Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sidebar, .top-navbar, .no-print {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .content-body {
    padding: 0 !important;
  }
  .panel-card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .barcode-print-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    page-break-inside: auto;
  }

  .barcode-sticker {
    border: 1px dashed #cccccc !important;
    padding: 10px !important;
    text-align: center !important;
    background: #ffffff !important;
    page-break-inside: avoid;
    color: #000000 !important;
  }

  .barcode-sticker svg {
    max-width: 100% !important;
    height: auto !important;
  }
}
