/* Start of Styling for base.html */

/* ===== Global Styles ===== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #6a994e, #f2e8cf); /* Deep olive to light khaki */
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  color: #1e1e1e;
}

/* ===== Wrapper ===== */
#wrapper {
  display: flex;
  transition: all 0.3s ease;
}

/* ===== Glassmorphic Sidebar ===== */
.glass-sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
  color: #fff;
  min-height: 100vh;
  position: fixed;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Sidebar header */
.sidebar-heading {
  padding: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 1.3rem;
  color: #fff;
}

/* Sidebar links */
#sidebar-wrapper .nav-link {
  display: block;
  color: #fff;
  padding: 12px 20px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border-radius: 8px;
  margin: 4px 10px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

#sidebar-wrapper .nav-link:hover,
#sidebar-wrapper .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Active state */
#sidebar-wrapper .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

/* ===== Top Navbar ===== */
.glass-navbar {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 999;
}

/* ===== Page Content ===== */
#page-content-wrapper {
  margin-left: 250px;
  padding: 30px;
  transition: all 0.3s ease;
  width: 100%;
}

/* Collapsed sidebar */
#wrapper.toggled #page-content-wrapper {
  margin-left: 0;
}

.glass-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Footer ===== */
.glass-footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 1rem;
  color: #000 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Sidebar Toggle ===== */
#wrapper.toggled .glass-sidebar {
  transform: translateX(-250px);
}


/* END of Styling for base.html */

/* Start of Styling for buying.html */

/* Center wrapper for the form and heading */
.form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

/* Shared buy-sell form styles */
.buy-sell-form {
    max-width: 500px;
    width: 100%;
    background-color: transparent;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Labels inside form */
.buy-sell-form label {
    display: block;
   
    font-weight: 500;
    color: #333;
}

/* Input field styles */
.form-input {
    padding: 8px 10px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.2); /* semi-transparent white */
    border: 1px solid rgba(200, 200, 200, 0.5);  /* subtle border */
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    color: #000; /* ensure text remains readable */
}

.form-input:focus {
    border-color: #0077cc;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 119, 204, 0.3);
    background-color: rgba(255, 255, 255, 0.35); /* brighten on focus */
}



/* Limit input width */
.short-input {
    width: 250px;
    max-width: 100%;
}

/* Save button style */
.btn-save.custom-save {
    background-color: #003366;  /* Deep blue */
    color: #fff;
    font-weight: 500;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-save.custom-save:hover {
    background-color: #002244;
}

.buying-records-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 16px;
}

.buying-records-container h3 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
  font-weight: 600;
}

.responsive-table-wrapper {
  overflow-x: auto;
}

.buying-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.buying-table th,
.buying-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.buying-table th {
  background-color: #6a994e;
  color: white;
  font-weight: 600;
}

.buying-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.08);
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.95rem;
  text-decoration: none;
  color: white;
  transition: background-color 0.3s ease;
}

.edit-btn {
  background-color: #6a994e;
}

.edit-btn:hover {
  background-color: #52784f;
}

.delete-btn {
  background-color: #b94545;
  margin-left: 6px;
}

.delete-btn:hover {
  background-color: #992e2e;
}

/* Container for action buttons */
.action-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* END of Styling for buying.html */

/* Start of Styling for sales.html */

/* Center wrapper for the form and heading */

.form-button-wrapper {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.btn-back {
  display: inline-block;
  padding: 8px 16px;
  background-color: #003366;  /* Same deep blue */
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-back:hover {
  background-color: #002244;
}


/* END of Styling for base.html */

/* Start of Styling for login.html */

.form-logo {
  display: block;
  margin: 0 auto 10px auto;
  border-radius: 20%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.login-register-wrapper {
  background-color: rgba(255, 255, 255, 0.12); /* light opacity white */
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  max-width: 400px;
  width: 100%;
  margin: 40px auto;
  box-sizing: border-box;
}

.login-register-wrapper h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 1.6rem;
  color: #1e1e1e;
}

.login-register-wrapper label {
  display: block;
  margin-top: 15px;
  margin-bottom: 6px;
  font-weight: 500;
}

.login-register-wrapper input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #aaa;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.25); /* subtle background */
  color: #1e1e1e;
  font-size: 1rem;
  box-sizing: border-box;
}

.login-register-wrapper input:focus {
  border-color: #6a994e;
  outline: none;
  background-color: rgba(255, 255, 255, 0.4);
}

/* Eye icon positioning */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px; /* space for eye icon */
}

.password-wrapper i {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6a994e;
}

/* Submit button */
.login-register-wrapper button {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  background-color: #6a994e;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-register-wrapper button:hover {
  background-color: #52784f;
}

/* Heading + Register button */
.login-register-wrapper h3 {
  margin-top: 20px;
  text-align: center;
  font-size: 0.95rem;
}

.login-register-wrapper a {
  display: block;
  text-align: center;
  color: white;
  background-color: #6a994e;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.login-register-wrapper a:hover {
  background-color: #52784f;
}

/* END of Styling for login.html */

/* Start of Styling for expenses.html */

.expense-form-container {
  max-width: 800px;        /* control width */
  margin: 40px auto;       /* centers horizontally */
  padding: 20px;
  background-color: transparent;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}


.expense-form-container h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
  font-weight: 600;
}


.btn-add {
        padding: 6px 12px;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-top: 4px;
    }

.btn-add:hover {
        background-color: #2980b9;
    }

.btn-rm {
        padding: 6px 12px;
        background-color: #b94545;;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-top: 4px;
    }

.btn-rm:hover {
        background-color: #992e2e;
    }

.expense-item {
  display: flex;
  flex-wrap: wrap; /* optional: wrap on smaller screens */
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.expense-item label {
  margin-right: 4px;
  white-space: nowrap;
}

.expense-item select,
.expense-item input {
  width: 130px; /* adjust based on your design */
  padding: 4px 6px;
}

.expenses-records-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 16px;
}

.expenses-records-container h3 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
  font-weight: 600;
}

.expenses-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.expenses-table th,
.expenses-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.expenses-table th {
  background-color: #6a994e;
  color: white;
  font-weight: 600;
}

.expenses-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.08);
}


/* ===== Responsive Adjustments for sales, buy===== */
@media (max-width: 768px) {
  .glass-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh; /* Full viewport height */
    width: 250px;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto; /* Makes sidebar scrollable if nav links exceed screen height */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  #wrapper.toggled .glass-sidebar {
    transform: translateX(0);
  }

  #page-content-wrapper {
    margin-left: 0;
    padding: 20px;
  }
}

/* ===== Responsive Adjustments for login, register===== */

/* Responsive tweaks */
@media (max-width: 480px) {
  .login-register-wrapper {
    padding: 16px;
    margin: 30px auto;
  }

  .login-register-wrapper h2 {
    font-size: 1.4rem;
  }

  .login-register-wrapper input,
  .login-register-wrapper button {
    font-size: 0.95rem;
    padding: 10px;
  }

  .form-logo {
    width: 36px;
    margin-bottom: 6px;
  }

  .login-register-wrapper h3 {
    font-size: 0.9rem;
  }
}

/*responsive for buy table */
@media (max-width: 600px) {
  .buying-records-container h3 {
    font-size: 1.2rem;
  }

  .buying-table th,
  .buying-table td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  .action-btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    font-size: 0.85rem;
    padding: 5px 10px;
    width: 100%;  /* Optional: make buttons full-width */
    max-width: 100px;
  }
}

/* expense page responsive */

