.navbar {
    background: linear-gradient(135deg, #1a7e38, #1a7e38);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.logo h1 {
  text-decoration: none; 
  color:white;        
  cursor: pointer;        
    font-size: 1.8rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
  text-decoration: none;
  color: inherit;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(79,195,247,0.2);
}

.login-btn {
    background: #335413;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.login-btn:hover {
    background-color: #21350c;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
}

/* Page container and header */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: transparent;
    padding: 18px 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.15rem;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Hero */
.hero {
    padding: 80px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 2.25rem;
    line-height: 1.05;
    margin-bottom: 16px;
    color: var(--text-main);
}

.hero p {
    color: var(--text-gray);
    max-width: 760px;
    margin: 0 auto 24px;
    font-size: 1.05rem;
}

/* Auth / Register */
.auth-container {
    max-width: 560px;
    margin: 48px auto;
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-main);
    background: white;
}

input::placeholder { color: #94a3b8; }

@media (max-width: 768px) {
    .hero h1 { font-size: 1.6rem; }
    .auth-container { margin: 24px 16px; padding: 20px; }
    .nav-links { gap: 8px; }
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("images/money.webp")
                no-repeat center center / cover;
    opacity: 0.25;
    z-index: -1;
}
/* Icons */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: rgb(1, 81, 1);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: transform 0.3s;
    z-index: 50;
}

.brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand img {
    height: 32px;
    width: 32px;
    background: white;
    border-radius: 6px;
    padding: 2px;
}

.nav {
    padding: 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
}

.user-mini {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.user-meta {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: whitesmoke;
}

.user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}
.button-group {
    display: flex;
    gap: 15px; 
    justify-content: flex-end; 
}

.btn {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #3e8e41;
}

/* Main Content */
.main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    max-width: 1600px;
}
.maincontent {
    flex: 1;
    margin-left: 525px;
    margin-top: 23px;
    padding: 32px;
    max-width: 1600px;
    margin-right: 160px;
}


/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.page-title span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: whitesmoke;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card-green {
    background: linear-gradient(135deg, #3eb646 0%, #339439 100%);
    color: white;
    border: none;
}

.balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.progress-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--warning);
    border-radius: 4px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.detail-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 600;
    color: var(--text-main);
}

.copy-box {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    display: inline-block;
    border: 1px solid var(--border);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.amount-neg { color: var(--danger); font-weight: 600; }
.amount-pos { color: var(--success); font-weight: 600; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #3eb646;
    color: white;
}

.btn-primary:hover {
    background-color:#339439;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-danger:hover {
    background: #fecaca;
}

/* Login Page */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(4px);        
}
.login-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.75rem;
    color: var(--text-main);
    margin-top: 16px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 55px; 
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color:  #3eb646;
    box-shadow: 0 0 0 3px rgba(0,86,179,0.1);
}

.btn-block {
    width: 100%;
    padding: 12px;
}

/* Payment Portal */
.portal-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("images/money.webp")
                no-repeat center center / cover;
    opacity: 0.25;
    z-index: -1;
}
}

.portal-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.portal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.hidden { display: none; }
.block { display: block; }

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; padding: 20px; }
}
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .menu-btn {
    display: block;
    color: white;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    display: none;
    margin-top: 10px;
    background: #1a7e38;
    padding: 10px;
    border-radius: 8px;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    padding: 10px;
    text-align: center;
  }
}
@media (max-width: 768px) {
  .menu-btn {
    display: block;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
  }

  .navbar {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a7e38;
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 1rem 0;
    z-index: 999;
  }

  /* 🔥 THIS IS THE IMPORTANT LINE */
  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 1rem;
    width: 100%;
  }
}
