/* =========================================================
   Amar Krishi - Main Stylesheet
   Theme: Green / Light Green / Yellow accent, soft minimal cards
   ========================================================= */

:root {
  --color-primary: #1b7a3d;
  --color-primary-dark: #145c2e;
  --color-primary-light: #e8f5ec;
  --color-secondary: #6fcf8e;
  --color-accent: #f2b705;
  --color-bg: #f7f9f7;
  --color-card: #ffffff;
  --color-text: #1f2a23;
  --color-text-muted: #6b7c72;
  --color-border: #e6ece8;
  --color-danger: #e0533d;
  --color-warning: #f2b705;
  --color-success: #2e9e5b;
  --radius: 15px;
  --shadow-soft: 0 4px 16px rgba(27, 122, 61, 0.08);
  --shadow-hover: 0 8px 24px rgba(27, 122, 61, 0.14);
  --sidebar-width: 250px;
  --font-main: 'Poppins', 'Hind Siliguri', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 24px 28px 60px;
  width: calc(100% - var(--sidebar-width));
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary-dark);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 20px;
}

.sidebar .brand i { font-size: 26px; color: var(--color-accent); }
.sidebar .brand h1 { font-size: 19px; font-weight: 700; color: #fff; }
.sidebar .brand span { font-size: 11px; color: rgba(255,255,255,0.65); display: block; }

.sidebar nav { flex: 1; }

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar nav a i { width: 18px; text-align: center; }

.sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }

.sidebar nav a.active {
  background: var(--color-accent);
  color: #1f2a23;
  font-weight: 600;
}

.sidebar .help-card {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  margin-top: 10px;
}

.sidebar .help-card i { font-size: 20px; color: var(--color-accent); margin-bottom: 6px; }
.sidebar .help-card p { font-size: 12.5px; color: rgba(255,255,255,0.85); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 22px;
}

.topbar .search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border-radius: 10px;
  padding: 9px 14px;
  gap: 8px;
  border: 1px solid var(--color-border);
}

.topbar .search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
}

.topbar .lang-switch,
.topbar .notif-btn,
.topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.topbar .notif-btn { position: relative; }
.topbar .notif-btn .badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.topbar .user-chip img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar .user-chip .name { font-size: 13.5px; font-weight: 600; }
.topbar .user-chip .role { font-size: 11px; color: var(--color-text-muted); }

/* ---------- Hero Banner ---------- */
.hero-banner {
  background: linear-gradient(120deg, #fff8e6, #eef9ee 60%);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
  overflow: hidden;
  position: relative;
}

.hero-banner .hero-text h2 {
  font-size: 30px;
  color: var(--color-primary-dark);
  line-height: 1.2;
}
.hero-banner .hero-text h2 span { display: block; color: var(--color-primary); }
.hero-banner .hero-text p { color: var(--color-text-muted); margin: 10px 0 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }

.hero-stats { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats .stat { display: flex; align-items: center; gap: 10px; }
.hero-stats .stat i { color: var(--color-primary); font-size: 18px; background: #fff; padding: 9px; border-radius: 10px; }
.hero-stats .stat strong { display: block; font-size: 16px; }
.hero-stats .stat span { font-size: 11.5px; color: var(--color-text-muted); }

/* ---------- Quick Feature Icons ---------- */
.quick-features {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.feature-tile {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-tile i {
  font-size: 20px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  margin: 0 auto 10px;
}
.feature-tile span { font-size: 12px; font-weight: 500; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 2fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  font-size: 15px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.tag-high, .tag-danger { background: #fde8e4; color: var(--color-danger); }
.tag-medium, .tag-warning { background: #fff4d8; color: #a87000; }
.tag-low, .tag-success { background: #e3f6e9; color: var(--color-success); }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 10px 8px; font-size: 13.5px; border-bottom: 1px solid var(--color-border); }
table th { color: var(--color-text-muted); font-weight: 600; font-size: 12.5px; }
.price-up { color: var(--color-success); font-weight: 600; }
.price-down { color: var(--color-danger); font-weight: 600; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 14px;
  background: var(--color-bg);
  outline: none;
  transition: border-color 0.15s ease;
}
.form-control:focus { border-color: var(--color-primary); }
select.form-control { appearance: none; }

/* ---------- Auth Pages ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-light), #fff8e6);
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-card .brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; }
.auth-card .brand i { color: var(--color-primary); font-size: 28px; }
.auth-card h2 { text-align: center; margin-bottom: 4px; }
.auth-card p.sub { text-align: center; color: var(--color-text-muted); margin-bottom: 22px; font-size: 13.5px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--color-text-muted); }
.auth-footer a { color: var(--color-primary); font-weight: 600; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-success { background: #e3f6e9; color: var(--color-success); }
.alert-error { background: #fde8e4; color: var(--color-danger); }

/* ---------- Sidebar quick action list ---------- */
.action-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-bg);
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}
.action-list a i:first-child { color: var(--color-primary); margin-right: 8px; }

.sms-card {
  background: var(--color-primary-light);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-top: 18px;
}
.sms-card i { font-size: 34px; color: var(--color-primary); margin-bottom: 10px; }
.sms-card p { font-size: 12.5px; color: var(--color-text-muted); margin: 8px 0 14px; }

/* ---------- Footer ---------- */
.footer-bar {
  display: flex;
  justify-content: space-between;
  padding: 18px 4px 0;
  font-size: 12px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bar a { margin-left: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .quick-features { grid-template-columns: repeat(4, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; padding: 16px; }
  .hero-banner { flex-direction: column; text-align: center; }
  .quick-features { grid-template-columns: repeat(3, 1fr); }
  .topbar .search-box { order: 3; flex-basis: 100%; }
}

.mobile-toggle {
  display: none;
  background: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}
@media (max-width: 768px) {
  .mobile-toggle { display: inline-flex; }
}
