/* Secur-SA Premium Design System v2.0 */
:root {
  --primary: #10b981; /* Emerald */
  --primary-glow: rgba(16, 185, 129, 0.2);
  --bg-dark: #070a13;
  --bg-card: #0f172a;
  --bg-sidebar: #0b1120;
  --border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --font-family: 'Tajawal', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  margin: 0;
  overflow-x: hidden;
}

/* Glassmorphism Effects */
.glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

/* Sidebar Redesign */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.sidebar-header {
  padding: 30px 20px;
  text-align: center;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), #059669);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 25px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 3px solid transparent;
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: linear-gradient(to left, rgba(16, 185, 129, 0.1), transparent);
  border-right-color: var(--primary);
}

/* Main Content Area */
.main-content {
  margin-right: 280px;
  padding: 40px;
  min-height: 100vh;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.page-title h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(16, 185, 129, 0.3);
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.05), transparent);
  pointer-events: none;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  display: block;
  margin-bottom: 5px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tables */
.table-container {
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

th {
  background: rgba(255,255,255,0.03);
  padding: 15px 20px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Professional Buttons */
.btn-premium {
  background: linear-gradient(135deg, var(--primary), #059669);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-premium:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Report Styles (Hidden until printing) */
#report-template {
  display: none;
}

@media print {
  body * { visibility: hidden; }
  #report-template, #report-template * { visibility: visible; }
  #report-template {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block !important;
    background: white !important;
    color: #000 !important;
    padding: 40px;
  }
  .no-print { display: none !important; }
}
