/**
 * Tara Group of Industries - Central Admin & Portal Design System
 * Version 1.0 (Production Release)
 * Cohesive Theme, Design Tokens, Typography, and Components
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-dark: #121418;
  --secondary-dark: #1e222b;
  --accent-gold: #ffc451;
  --accent-hover: #e0a83b;
  --accent-subtle: rgba(255, 196, 81, 0.12);
  --bg-light: #f4f6fa;
  --card-bg: #ffffff;
  --text-dark: #2b2f38;
  --text-muted: #6c757d;
  --border-color: #edf0f5;
  --border-subtle: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Global Page Base */
html, body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-content-wrapper {
  flex: 1 0 auto;
}

/* Page Header Card - Unified Across All Pages */
.page-header-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  position: relative;
  transition: all 0.2s ease;
}

.page-header-card h4 {
  color: var(--primary-dark);
  letter-spacing: -0.2px;
}

/* Standardized Card Styling */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card, .metric-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.stat-card:hover, .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Form Controls & Inputs */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid #ced4da;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 0.25rem rgba(255, 196, 81, 0.25);
  outline: 0;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.35rem;
}

/* Standardized Buttons */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-gold {
  background-color: var(--accent-gold);
  color: var(--primary-dark);
  font-weight: 600;
  border: none;
}

.btn-gold:hover, .btn-gold:focus {
  background-color: var(--accent-hover);
  color: #000000;
}

.btn-excel {
  background-color: #198754;
  color: #ffffff;
  border: 1px solid #146c43;
}

.btn-excel:hover, .btn-excel:focus {
  background-color: #157347;
  color: #ffffff;
}

/* Modern Sleek Scrollbars */
.table-responsive::-webkit-scrollbar,
::-webkit-scrollbar {
  height: 7px;
  width: 7px;
}

.table-responsive::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
  background: #f1f3f7;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: #caced8;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Standard Table Styling */
.table {
  color: var(--text-dark);
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.65rem 0.75rem;
}

.table-hover > tbody > tr:hover {
  background-color: rgba(255, 196, 81, 0.04);
}

/* Modals */
.modal-content {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 22px;
}

.modal-header.bg-dark {
  background-color: var(--primary-dark) !important;
  border-bottom: 2px solid var(--accent-gold);
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 14px 22px;
}

/* Badges */
.badge {
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Version Marker Badge */
.portal-v1-badge {
  background-color: #151515;
  color: var(--accent-gold);
  border: 1px solid rgba(255, 196, 81, 0.35);
  font-size: 0.65rem;
  padding: 3px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* Unified Global Admin Footer */
.admin-global-footer {
  margin-top: auto;
  background: transparent;
  color: var(--text-muted);
}

.footer-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.footer-brand-badge {
  background: var(--accent-gold);
  color: var(--primary-dark);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.footer-brand-title {
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
  font-size: 0.88rem;
}

.footer-version-badge {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Pulsing Status Dot */
.status-indicator-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #198754;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(25, 135, 84, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header-card {
    padding: 16px 18px;
    margin-bottom: 16px;
  }
}
