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

:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.1);
  --accent-success: #2C3E35;
  --accent-success-hover: #3A5247;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  
  --inv-paper: #ffffff;
  --inv-text: #1e293b;
  --inv-text-muted: #64748b;
  --inv-border: #e2e8f0;
  --inv-bg: #f8fafc;
  
  --danger: #ef4444;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Layout */
.app-container {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
  max-width: 1020px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
  width: 100%;
}

@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
  }
}

.left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.tabs {
  display: flex;
  background: var(--bg-dark);
  border-radius: 0.5rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-dark);
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.6rem;
  transition: all 0.2s;
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Compact Salary Slip */
.salary-slip {
  background-color: var(--inv-paper);
  color: var(--inv-text);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
}

.slip-header {
  border-bottom: 1px solid var(--inv-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.slip-header h2 {
  font-size: 1.25rem;
  color: var(--inv-text);
  margin-bottom: 0.25rem;
}

.slip-header p {
  color: var(--inv-text-muted);
  font-size: 0.75rem;
}

.slip-section {
  margin-bottom: 0.75rem;
}

.slip-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}

.slip-section-title.light {
  border-bottom: 1px solid var(--inv-border);
}

.slip-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.slip-row.total {
  font-weight: 700;
  font-size: 0.95rem;
  border-top: 1px dashed var(--inv-border);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.slip-row.net {
  background-color: var(--inv-bg);
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: var(--primary-hover);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.text-danger { color: var(--danger); }
.text-success { color: var(--accent-success); }
.text-muted { color: var(--text-muted); }

.hidden { display: none !important; }

/* Grid for advanced inputs */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* History Card */
.history-card {
  height: 100%;
}

.history-card .slip-section-title {
  margin-bottom: 1rem;
}

/* Make table responsive within card */
.table-container {
  overflow-x: auto;
}
