:root {
  /* Colors */
  --primary: #003366;
  /* Fabristeel corporate blue */
  --primary-light: #004d99;
  --secondary: #f4f6f8;
  /* Background grey */
  --white: #ffffff;
  --text-dark: #1a202c;
  --text-grey: #718096;
  --border: #e2e8f0;

  --success: #38a169;
  /* Green for Approved/Completed */
  --warning: #ecc94b;
  /* Yellow for Pending/Quoted */
  --danger: #e53e3e;
  /* Red for overdue/alert */
  --info: #3182ce;
  /* Blue for open */

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--secondary);
  color: var(--text-dark);
  height: 100vh;
  display: flex;
}

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

aside {
  width: 260px;
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-lg) 0;
  min-height: 100vh;
  height: auto;
  overflow-y: auto;
}

aside .brand {
  padding: 0 var(--spacing-lg) var(--spacing-xl);
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--spacing-md);
}

aside nav a {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

aside nav a:hover,
aside nav a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-right: 4px solid var(--white);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  background-color: var(--white);
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
}

.content {
  padding: var(--spacing-lg);
  overflow-y: auto;
  flex: 1;
}

/* Components */
.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.stat-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: var(--spacing-sm) 0;
}

.stat-label {
  color: var(--text-grey);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-dark);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: #f7fafc;
  color: var(--text-grey);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green {
  background: #c6f6d5;
  color: #22543d;
}

.badge-yellow {
  background: #fefcbf;
  color: #744210;
}

.badge-blue {
  background: #bee3f8;
  color: #2a4365;
}

.badge-red {
  background: #fed7d7;
  color: #742a2a;
}

.status-open {
  color: var(--info);
}

.status-approved {
  color: var(--success);
}

.status-pending {
  color: var(--warning);
}