/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f0f2f8;
  color: #1e293b;
  line-height: 1.4;
}

/* Login Styles */
.login-overlay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b2b26 0%, #1a4a41 100%);
  padding: 1rem;
}

.login-card {
  background: white;
  max-width: 460px;
  width: 100%;
  border-radius: 42px;
  padding: 2rem;
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.input-field {
  margin: 1rem 0;
  text-align: left;
}

.input-field input,
.input-field select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 28px;
  border: 1px solid #d0e0db;
  font-family: inherit;
}

.btn-login {
  background: #1d5b50;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 40px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-login:hover {
  background: #0f453c;
}

.error-msg {
  color: #c2410c;
  background: #fff2e8;
  padding: 8px;
  border-radius: 30px;
  margin-top: 1rem;
  font-size: 0.8rem;
}

/* Main App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0b2b26 0%, #0a1f1c 100%);
  color: #e2f0ed;
  flex-shrink: 0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.logo-area {
  margin-bottom: 2rem;
  border-left: 3px solid #2dd4bf;
  padding-left: 1rem;
}

.company-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.company-sub {
  font-size: 0.7rem;
  color: #9bb3ae;
}

.procure-badge {
  background: rgba(45, 212, 191, 0.18);
  display: inline-block;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 8px;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #cbdcd8;
  cursor: pointer;
  transition: 0.2s;
}

.nav-item.active {
  background: #2c4a44;
  color: white;
}

.nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.8rem 2rem 2rem 2rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1e3c37, #0f2c27);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.user-badge {
  background: white;
  padding: 6px 18px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.logout-btn {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 28px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
  border: 1px solid #eef2f0;
  transition: transform 0.1s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-title {
  font-size: 0.8rem;
  color: #5b7c74;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1d5b50;
}

.form-panel,
.table-panel,
.report-panel {
  background: white;
  border-radius: 28px;
  padding: 1.6rem 2rem;
  margin-top: 1rem;
  border: 1px solid #edf2f0;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e3c37;
}

.rfq-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select,
textarea {
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid #dce5e2;
  font-family: inherit;
  font-size: 0.9rem;
}

.btn-primary {
  background: #1d5b50;
  border: none;
  padding: 10px 24px;
  border-radius: 34px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary:hover {
  background: #0f453c;
}

.btn-secondary {
  background: #2c5e55;
  border: none;
  padding: 8px 18px;
  border-radius: 34px;
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-danger {
  background: #b91c1c;
  border: none;
  padding: 8px 18px;
  border-radius: 34px;
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #ecf3f0;
  vertical-align: middle;
}

.badge {
  background: #e0f2ef;
  padding: 4px 10px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
}

.status-draft {
  background: #fef9e3;
  color: #b85c00;
}

.status-sent {
  background: #e0f2fe;
  color: #0369a1;
}

.status-awarded {
  background: #e0f2ef;
  color: #1d6f5c;
}

.status-lost {
  background: #ffe6e5;
  color: #b91c1c;
}

.file-link {
  color: #1d5b50;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
}

.file-link:hover {
  text-decoration: underline;
}

.wip-checkbox {
  transform: scale(1.1);
  margin-right: 5px;
  cursor: pointer;
}

.persist-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1d5b50;
  color: white;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 0.75rem;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.user-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
}

@media (max-width: 780px) {
  .sidebar {
    width: 80px;
    padding: 1rem 0.5rem;
  }
  .sidebar span:not(.icon-only) {
    display: none;
  }
}