* {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}
html
{
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    
}

h1, h2 {
    text-align: center;
    color: #333;
}


.main-table {
   
    table-layout: fixed;
    overflow:scroll;
    z-index: 1;
}
.sub-table
{
    width: 100%;
    table-layout: fixed;
    overflow-x:scroll;
    z-index: 1;
}
.main-table th
{
    padding: 8px;
    text-align: center;
    vertical-align: top;
    word-wrap: break-word;
    border: 1px solid #ccc;
}

.right-align
{
    padding: 7px;
    text-align: right !important;
    vertical-align: middle;
    word-wrap: break-word;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow-x: auto;
}



th {
    background-color: #1f2937;
    color: white;
}
tr:nth-child(even) {
    background-color: #d1f4fa;
}
tr:hover {
    background-color: #f1f5f9;
}

.expense-item, .add-expense-form {
    margin-bottom: 10px;
}

.btn-download-invoice {
  display: inline-flex;
    justify-content: center;
    width: 150px;
    align-items: center;
  gap: 8px;
  background-color: #2563EB; /* Tailwind's blue-600 */
  color: white;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 6px rgb(37 99 235 / 0.3);
  user-select: none;
}

.btn-download-invoice:hover,
.btn-download-invoice:focus {
  background-color: #1E40AF; /* Tailwind's blue-800 */
  box-shadow: 0 6px 12px rgb(30 64 175 / 0.5);
  outline: none;
  cursor: pointer;
}

.btn-download-invoice .icon {
  width: 20px;
  height: 20px;
}

.remove-btn,
.add-project,
button[type="submit"] {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}
.btn-status-update {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-status-update:hover {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-status-update::after {
  content: '→';
  position: absolute;
  right: 12px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease-in-out;
}

.btn-status-update:hover::after {
  opacity: 1;
  transform: translateX(0);
}
/* Status Dot Animation */
.status-dot {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  animation: pulse 1.5s infinite;
  vertical-align: middle;
}

/* Status-specific colors */


.status-text {
  font-weight: 600;
  color: #374151;
  margin-right: 12px;
}

/* Elegant Button */
.btn-status-update {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-status-update:hover {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-status-update::after {
  content: '';
  position: absolute;
  right: 12px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease-in-out;
}

.btn-status-update:hover::after {
  opacity: 1;
  transform: translateX(0);
}
.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
  animation: pulseBlink 1.5s infinite ease-in-out;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0); /* Initial shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-dot.not-started {
  background-color: red;
  box-shadow: 0 0 6px rgba(255, 0, 0, 0.5);
}

.status-dot.in-progress {
  background-color: orange;
  box-shadow: 0 0 6px rgba(255, 165, 0, 0.5);
}

.status-dot.completed {
  background-color: green;
  box-shadow: 0 0 6px rgba(0, 128, 0, 0.5);
}
.status-dot.on-hold {
  background-color: rgb(0, 0, 0);
  box-shadow: 0 0 6px rgba(80, 80, 80, 0.5);
}
@keyframes pulseBlink {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0px rgba(0, 0, 0, 0.2);
  }
}


.remove-btn:hover,
.download_invoice:hover,
.add-project:hover,
button[type="submit"]:hover {
    background-color: #059669;
}

.form-header {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px;
}

form input[type="text"], form input[type="number"] , form input[type="date"],select{
    padding: 10px;
    width: 100%;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #ddd;
}
#payment_mode
{
    text-align: center;
    padding: 10px;
    width: 100%;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.add-expense-form {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.365);
    margin-top: 20px;
}


/* ul {
    padding-left: 18px;
    width: 10%;
    list-style: none;
    text-align: center;
}
ul li {
margin-bottom: 8px;
background-color: #2563eb;
padding: 8px;
 border-radius: 6px;
 transition: all 0.3s ease;
        }
ul li:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background-color: #0056b3;
    transform: scale(1.05);
} */
a{
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
}



.arrow {
        width: 20px;
        height: 20px;
        fill:rgb(255, 255, 255);
        transform:rotate(90deg);
        text-align: center;
        margin-right: 8px;
        margin-top: 3px;
        transition: transform 0.3s ease, fill 0.3s ease;
}
.nav-links li:hover .arrow ,.nav-links li:active .arrow {
    transform:rotate(-90deg);
    fill:#ffffff !important;
    color:#ffffff !important;
    }


.header {
    text-align: center;
    margin-bottom: 20px;
}
.header img {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}


select[name="project"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #333;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    appearance: none; /* Remove default arrow on some browsers */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
select[name="payment_mode"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #333;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    appearance: none; /* Remove default arrow on some browsers */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
select[name="project"]:focus {
    border-color: #5a9edc;
    box-shadow: 0 0 5px rgba(90, 158, 220, 0.5);
    background-color: #fff;
}

.add_form_div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    border-radius: 12px;
}
@media (max-width: 1024px) {
    .add_form_div {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 12px;
        padding: 10px;
    }

    .add-expense-form {
        padding: 12px;
        max-width: 100%;
        font-size: 14px;
        box-shadow: none;
    }

    .add-expense-form input,
    .add-expense-form select,
    .add-expense-form button {
        font-size: 14px;
        padding: 8px;
    }

    table {
        font-size: 14px;
        margin-top: 20px;
    }

    th, td {
        padding: 8px;
        white-space: nowrap;
    }

    .main-table {
        overflow-x: auto;
        display: block;
    }

    .remove-btn,
    .download_invoice,
    .add-project {
        font-size: 14px;
        padding: 6px 10px;
    }
     ul {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        padding-left: 0;
        margin-top: 20px;
    }

    ul li {
        width: auto;
        margin: 6px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0px;
    }

    .main-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }

    th, td {
        padding: 10px;
        white-space: nowrap;
    }

    .add-expense-form{
        padding: 15px;
        width: 100%;
    }

    form input[type="text"],
    form input[type="number"],
    button[type="submit"],
    .add-project {
        font-size: 14px;
        padding: 10px;
    }

    h1, h2 {
        font-size: 20px;
    }
     ul {
        width: 100%;
    }
    .remove-btn,
    .download_invoice {
        padding: 6px 10px;
        font-size: 13px;
    }
    label
    {
        font-size: 12px;
    }
    select[name="project"]
    {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    h1, h2 {
        font-size: 18px;
    }
     ul {
        width: 100%;
        padding-left: 0;
    }

    ul li {
        font-size: 14px;
        padding: 8px 12px;
        width: 200px;
    }
    table {
        margin-top: 20px;
    }

    .add-expense-form{
        margin: 10px auto;
    }

    .form-header {
        font-size: 16px;
    }
    .header {
        text-align: center; /* Center align the header */
        margin-bottom: 20px; /* Add some space below the header */
    }
    
    select[name="project"]
    {
        font-size: 10px;
    }
}



@media screen and (max-height: 500px) and (min-width: 480px) and (orientation: landscape) {
    body {
        padding: 8px;
        font-size: 13px;
    }

    h1, h2 {
        font-size: 18px;
        margin: 10px 0;
    }

    .add_form_div {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 12px;
        padding: 10px;
    }

    .add-expense-form {
        padding: 12px;
        max-width: 100%;
        font-size: 13px;
        box-shadow: none;
    }

    .add-expense-form input,
    .add-expense-form select,
    .add-expense-form button {
        font-size: 13px;
        padding: 8px;
    }

    table {
        font-size: 12px;
        margin-top: 20px;
    }

    th, td {
        padding: 8px;
        white-space: nowrap;
    }

    .main-table {
        overflow-x: auto;
        display: block;
    }

    .remove-btn,
    .download_invoice,
    .add-project {
        font-size: 12px;
        padding: 6px 10px;
    }

    select[name="project"],
    select[name="payment_mode"] {
        font-size: 12px;
        padding: 8px 10px;
        background-size: 10px;
    }

    ul {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
    }

    ul li {
        font-size: 12px;
        margin: 4px;
        padding: 6px 10px;
        flex: 0 0 auto;
    }

    .header img {
        width: 60px;
        margin-bottom: 10px;
    }

    nav ul {
        font-size: 12px;
        width: auto;
        display: flex;
        justify-content: center;
        gap: 10px;
    }
}


.rotate-message {
  background: #fffae6;
  color: #665500;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  border: 1px solid #ffd700;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Show only on small portrait devices */
@media (max-width: 600px) and (orientation: portrait) {
  #rotate-screen-message {
    display: block !important;
  }
}

/* Hide on landscape or larger screens */
@media (orientation: landscape), (min-width: 601px) {
  #rotate-screen-message {
    display: none !important;
  }
}







.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1f1f1f;
  padding: 1rem 2rem;
  color: #fff;
}
.logo {
  font-weight: bold;
  font-size: 1.5rem;
}
.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}
.nav-menu a:hover {
  color: #facc15; /* yellow */
}
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    background-color: #1f1f1f;
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    padding: 1rem;
  }
  .hamburger {
    display: block;
  }
}

.congrats-container {
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-top: 30px;
  animation: popFade 1s ease, floatPulse 3s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

@keyframes popFade {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes floatPulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
