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

:root {
  --primary: #C72027;
  --bg: #f8fafc;
  --sidebar-bg: #C72027;
  --card-bg: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --sidebar-w: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

.gp-app {
  width: 100%;
  min-height: 700px;
  display: flex;
  background: var(--bg);
  color: var(--text);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  margin: 30px 0;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 0 20px 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
}

.sidebar-header img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  padding: 2px;
}

.sidebar-header .greeting {
  font-weight: 600;
  font-size: 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0 15px;
  gap: 5px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 15px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.sidebar-link.text-danger:hover { background: rgba(255, 255, 255, 0.2); }

/* Main Content */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  padding: 20px 30px;
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid var(--border);
}

.hamburger {
  font-size: 24px;
  cursor: pointer;
  margin-right: 15px;
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 5px;
}

.topbar-title {
  font-weight: 600;
  font-size: 20px;
}

.content-area {
  padding: 30px;
  flex: 1;
  max-width: 1100px;
}

/* Cards & Sections */
.gp-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gp-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.card {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}
.card-title svg { color: var(--primary); }

/* Data Grid */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.data-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.data-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.data-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* New Summary Layout Grid */
.summary-top-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.welcome-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.welcome-text h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.welcome-text p {
  color: var(--muted);
  font-size: 14px;
}
.welcome-img {
  max-width: 160px;
  position: absolute;
  right: 20px;
  bottom: 0;
}

.quick-info-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.quick-info-card h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--text);
}

.qi-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  align-items: center;
}
.qi-label { color: var(--muted); display:flex; align-items:center; gap:8px;}
.qi-value { font-weight: 600; color: var(--text); }
.status-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* 4 Column Stats */
.summary-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.stat-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}
.stat-icon.red { background: rgba(199, 32, 39, 0.1); color: var(--primary); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.stat-info .stat-val {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}
.stat-info .stat-lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Bottom Split Row */
.summary-split-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.gp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gp-table th {
  text-align: left;
  padding: 12px 10px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.gp-table td {
  padding: 15px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}
.gp-table tr:last-child td { border-bottom: none; }

.notice-item {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}
.notice-item:last-child { border: none; padding: 0; margin: 0; }
.notice-bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; }
.notice-content h4 { font-size: 14px; margin-bottom: 4px; color: var(--text); }
.notice-content p { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* Inputs & Buttons */
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: var(--card-bg);
  color: var(--text);
  font-size: 14px;
}
input:focus { outline: none; border-color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}
.btn:hover { background: #a61b20; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn.secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn.secondary:hover { background: rgba(199,32,39,0.05); }

.file-label {
  display: inline-flex;
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(199,32,39,0.1);
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}
.file-label input { display: none; }

.sub { color: var(--muted); font-size: 13px; }

/* Mobile */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

@media (max-width: 991px) {
  .summary-top-row { grid-template-columns: 1fr; }
  .summary-split-row { grid-template-columns: 1fr; }
  .summary-stats-row { grid-template-columns: repeat(2, 1fr); }
  .welcome-img { display: none; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
  .hamburger {
    display: block;
  }
  .content-area {
    padding: 20px;
  }
  .summary-stats-row {
    grid-template-columns: 1fr;
  }
}
