:root {
  /* Colors based on screenshot */
  --color-primary: #FF6B00; /* Vibrant orange */
  --color-primary-light: #FFF0E5; /* Light orange for active states */
  --color-text-dark: #1E1E1E;
  --color-text-gray: #757575;
  --color-bg-app: #FAFAFA; /* App background */
  --color-bg-panel: #FFFFFF; /* Sidebar/Card background */
  --color-border: #E0E0E0;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --sidebar-width: 280px;
  
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--color-bg-app);
  color: var(--color-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  overflow: hidden; /* Prevent body scroll, scroll main content instead */
}

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-bg-panel);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 24px 16px;
}

.brand-logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--color-text-dark);
  margin-bottom: 24px;
}

.brand-logo span {
  color: var(--color-primary);
}

/* Company Selector in Sidebar */
.company-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-app);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
}

.company-selector-hint {
  font-size: 11px;
  color: var(--color-text-gray);
  text-align: center;
  margin-top: 8px;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--color-text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: var(--color-bg-app);
}

.nav-item.active {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: var(--color-text-gray);
}

.nav-item.active svg {
  color: var(--color-primary);
}

/* Sidebar Footer (User Profile) */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: #E0E7FF;
  color: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}
.user-role {
  font-size: 12px;
  color: var(--color-text-gray);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background-color: var(--color-bg-app);
}

/* Topbar for mobile (hidden on desktop) */
.mobile-topbar {
  display: none;
  align-items: center;
  padding: 16px 24px;
  background-color: var(--color-bg-panel);
  border-bottom: 1px solid var(--color-border);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: -8px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Content Container */
.content-wrapper {
  padding: 32px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Typography */
h1 { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* Cards */
.card {
  background-color: var(--color-bg-panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.02);
  margin-bottom: 24px;
}

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

.card-header h2 {
  margin-bottom: 0;
}

/* Forms & Inputs */
.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text-dark);
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  background-color: var(--color-bg-app);
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-bg-panel);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-full); /* OkosMunkalap uses pill-shaped buttons often */
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: 8px;
}

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

.btn-secondary {
  background-color: var(--color-bg-app);
  color: var(--color-text-dark);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background-color: #EEEEEE;
}

.btn-danger {
  background-color: #FEE2E2;
  color: #DC2626;
}
.btn-danger:hover {
  background-color: #FECACA;
}

/* Tables / Lists */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--color-text-gray);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background-color: var(--color-bg-app); }

/* Utility */
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0,0,0,0.2);
  }
  .mobile-topbar {
    display: flex;
  }
  .content-wrapper {
    padding: 16px;
  }
}

/* PDF Template */
#pdf-template-container {
  position: absolute;
  left: -9999px;
  top: 0;
}
.pdf-doc {
  width: 210mm; min-height: 297mm; padding: 20mm; background: white; color: black; font-family: Arial, sans-serif; box-sizing: border-box;
}
.pdf-header { display: flex; justify-content: space-between; border-bottom: 2px solid var(--color-primary); padding-bottom: 10px; margin-bottom: 20px; }
.pdf-title { color: var(--color-primary); font-size: 24px; font-weight: bold; }
.pdf-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.pdf-table th, .pdf-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
.pdf-table th { background-color: #f4f4f4; color: var(--color-primary); }
.pdf-signatures { display: flex; justify-content: space-between; margin-top: 50px; }
.pdf-sign-box { width: 45%; text-align: center; border-top: 1px solid black; padding-top: 10px; }
.pdf-sign-box img { max-width: 100%; height: 80px; margin-top: -90px; }
