/* assets/css/style.css - Green Theme (Fixed & Self-contained) */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* ===========================================
   Root Variables
=========================================== */
:root {
  --green-primary: #006b3f;
  --green-accent: #00a651;
  --green-light: #e8f5e9;
  --white: #ffffff;
  --gray-light: #f6f8f7;
  --gray-dark: #223;
  --muted: #667;
  --shadow: rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

/* ===========================================
   Reset & Base Styles
=========================================== */
* {
  box-sizing: border-box;
  font-family: 'Poppins', Segoe UI, Arial, Helvetica, sans-serif;
  transition: all 0.18s ease;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  background: var(--gray-light);
  color: var(--gray-dark);
  -webkit-font-smoothing: antialiased;
}

/* ===========================================
   Layout
=========================================== */
.container.small {
  max-width: 700px;
  margin: 60px auto;
  padding: 30px;
}

.card {
  margin-bottom: 30px;
}

.container-dashboard {
  flex: 1;
  margin-left: 60px;
  transition: margin-left 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 20px;
}



/* ===========================================
   Header
=========================================== */
header {
  text-align: center;
  margin-bottom: 50px;
}

.app-header {
  display: flex;
  flex-direction: column; /* stack vertically */
  align-items: center;    /* center horizontally */
  text-align: center;     /* center text inside */
  margin-top: 20px;    
  background: linear-gradient(90deg, #006b3f, #00a651);
  border-radius: 15px;
  padding: 20px 40px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  margin-bottom: 30px;
}

.app-header .logo {
  width: 100px;
  height: auto;
  border-radius: 50%; 
  object-fit: cover;
  padding: 5px;
  margin-bottom: 10px;
}

.app-header .titles {
  
  text-align: center;
}

.app-header .titles h1 {
  color: white;
  font-size: 1.8rem;
  margin: 0;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

.app-header .titles p {
  color: #f0f0f0;
  margin: 5px 0 0;
  font-size: 1.1rem;
  font-weight: 400;
}


/* ===========================================
   Card
=========================================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 6px 18px var(--shadow);
  margin-bottom: 18px;
  border-top: 6px solid var(--green-primary);
}

/* --- Centered section title --- */
.card h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: 24px;
}

/* ===========================================
   Forms
=========================================== */
/* Make the actions row span the full grid and center its contents */
.form-grid .actions {
  grid-column: 1 / -1;      /* span all columns */
  display: flex;            /* use flexbox for centering */
  justify-content: center;  /* center horizontally */
  align-items: center;      /* center vertically if needed */
  margin-top: 24px;
  gap: 12px;
}

/* Optional: slightly larger, more prominent submit button */
.form-grid .actions button {
  padding: 12px 28px;
  font-size: 1.05rem;
  border-radius: 12px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--gray-dark);
}

input[type=text],
input[type=email],
select,
textarea,
input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--green-accent);
  background: #fff;
  font-size: 14px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 166, 81, 0.12);
  border-color: var(--green-accent);
}

/* ===========================================
   Buttons
=========================================== */
.btn,
button {
  display: inline-block;
  background: var(--green-primary);
  color: var(--white);
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
}

.btn:hover,
button:hover {
  background: var(--green-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* --- Center the submit button --- */
.actions {
  margin-top: 24px;
  text-align: center;
}

/* ===========================================
   Info Box
=========================================== */
.info {
  background: linear-gradient(90deg, rgba(0, 166, 81, 0.06), rgba(0, 166, 81, 0.02));
  border-left: 5px solid var(--green-primary);
  padding: 12px;
  border-radius: 10px;
  color: var(--green-primary);
}

/* ===========================================
   Tables
=========================================== */
.list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.list table {
  width: 90%;              /* adjust width: try 80%, 70%, etc. */
  max-width: 1000px;       /* prevents it from stretching too much */
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Optional: make headers distinct */
.list th {
  background-color: #0b7b3e;
  color: white;
  text-align: left;
  padding: 10px;
}

/* Table cell styling */
.list td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

/* Add spacing under the section */
.list h3 {
  text-align: center;
  margin-bottom: 15px;
}

tr:hover td {
  background: var(--green-light);
}

/* ===========================================
   Stats
=========================================== */
.stats-container {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.stats {
  display: flex;
  justify-content: space-between; /* spread the 6 stats evenly */
  gap: 20px;                       /* spacing between stats */
  flex-wrap: nowrap;                /* no wrapping on desktop */
}

.stat {
  flex: 1;                          /* each stat takes equal width */
  padding: 20px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 6px 18px var(--shadow);
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  transition: transform 0.25s ease;
}


.stat:hover {
  transform: translateY(-3px);
}


.stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--green-primary);
  margin-top: 8px;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  background: var(--green-primary);
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--green-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 166, 81, 0.25);
}

/* ===========================================
   Status Badges
=========================================== */
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-transform: capitalize;
}

.status-Pending { background: #f0ad4e; }
.status-Under-Review { background: #17a2b8; }
.status-In-Progress { background: #007bff; }
.status-Resolved { background: #28a745; }
.status-Rejected { background: #dc3545; }

/* ===========================================
   Footer
=========================================== */
footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ===========================================
   Animations
=========================================== */
@keyframes lift {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.card,
header.app-header,
table,
.stat {
  animation: lift 0.45s ease both;
}

/* ===========================================
   Responsive Tweaks
=========================================== */
@media (max-width: 520px) {
  header.app-header {
    flex-direction: column;
    align-items: center;
  }
  .actions {
    text-align: center;
  }
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 60px;
  background-color: #2c3e50;
  color: white;
  transition: width 0.3s ease;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar.expanded {
  width: 250px;
}

.sidebar-header {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-toggle {
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
}

.sidebar-toggle span {
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.sidebar:hover .sidebar-toggle span {
  opacity: 1;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 15px;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  gap: 15px;
}

.sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item i {
  min-width: 30px;
  text-align: center;
  font-size: 18px;
}

.sidebar-item span {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar.expanded .sidebar-item span {
  opacity: 1;
}

/* Adjust main content to account for sidebar */
.container {
  margin-left: 60px;
  transition: margin-left 0.3s ease;
}

.sidebar.expanded ~ .container {
  margin-left: 250px;
}

/* Alternative: If using flexbox layout */
body {
  display: flex;
}

.main-content {
  flex: 1;
  margin-left: 0;
}

@media (max-width: 768px) {
  .container.small {
    margin: 15px;
    padding: 20px;
  }

  .app-header {
    flex-direction: column;
    text-align: center;
  }

  .app-header .logo {
    width: 80px;
    /* Changed this line to center the logo horizontally */
    margin: 0 auto 10px auto; 
  }

  .app-header .titles h1 {
    font-size: 1.3rem;
  }

  .app-header .titles p {
    font-size: 0.95rem;
  }

  .card h2 {
    font-size: 1.4rem;
  }

  input, select, textarea {
    font-size: 0.95rem;
  }

  button, .btn {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
  }
      .back-btn {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
      }
    }