/* Basic styles for your web app */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right top, #89CFF0, #CCCCFF); /* Light blue to light purple gradient */
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
}

.container {
    display: flex;
    margin-top: 20px; /* Space below header */
}

.sidebar {
    width: 250px;
    background-color: rgba(255, 255, 255, 0.1); /* More translucent glassmorphism background */
    backdrop-filter: blur(15px); /* Increased blur */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Stronger border */
    border-radius: 15px; /* More rounded corners */
    padding: 20px;
    margin-left: 20px;
    color: white;
    min-height: calc(100vh - 100px);
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 ); /* Subtle shadow */
}

.sidebar h2 {
    margin-top: 0;
    color: white;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.sidebar ul li a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: 1px solid transparent;
    text-align: left;
    font-weight: bold;
}

.sidebar ul li a:hover {
    background: linear-gradient(to right, #007bff, #ff69b4);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.content {
    flex-grow: 1;
    padding: 20px;
    margin-right: 20px;
    color: #333; /* Changed to a darker color for better contrast on white backgrounds */
}

.content-section {
    display: none; /* Hidden by default */
    margin-bottom: 40px; /* Space between sections */
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1); /* Glassmorphism background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
}

.content-section:first-of-type {
    display: block; /* First section (Dashboard) visible by default */
}

.form-container {
    background-color: rgba(255, 255, 255, 0.1); /* More translucent glassmorphism background */
    backdrop-filter: blur(15px); /* Increased blur */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Stronger border */
    border-radius: 15px; /* More rounded corners */
    padding: 20px;
    margin: 0 20px;
    color: white;
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 ); /* Subtle shadow */
}

.form-container h2.form-title {
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.denomination-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.denomination-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05); /* More translucent */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 5px;
}

.denomination-item label {
    font-size: 0.8em;
    margin-bottom: 3px;
    font-weight: bold;
}

.denomination-item input[type="number"] {
    width: 40px;
    padding: 3px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.02); /* Even more translucent */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    color: white;
    font-weight: bold;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05); /* More translucent */
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2C114.7L159.7%2C242c-3.9%2C3.9-8.9%2C5.8-14%2C5.8s-10.1-1.9-14-5.8L5.4%2C114.7c-7.8-7.8-7.8-20.5%2C0-28.3c7.8-7.8%2C20.5-7.8%2C28.3%2C0l110.3%2C110.3l110.3-110.3c7.8-7.8%2C20.5-7.8%2C28.3%2C0C294.8%2C94.2%2C294.8%2C106.9%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px;
}

#mobilenumber {
    border: 1px solid rgba(173, 216, 230, 0.7); /* Light blue border for distinction */
}

.form-group select option {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
}

.save-btn {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.history-container {
    background-color: rgba(255, 255, 255, 0.1); /* More translucent glassmorphism background */
    backdrop-filter: blur(15px); /* Increased blur */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Stronger border */
    border-radius: 15px; /* More rounded corners */
    padding: 20px;
    margin: 20px 0; /* Adjusted for full width */
    color: white;
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 ); /* Subtle shadow */
}

.history-container h2 {
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: left;
    font-family: Arial, sans-serif;
    font-weight: bold;
    vertical-align: middle;
}

.data-table .action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    margin: 2px;
    transition: background-color 0.3s ease;
}

.data-table .delete-entry-btn,
.data-table .delete-account-btn {
    background-color: #dc3545;
}

.data-table .edit-entry-btn,
.data-table .edit-account-btn {
    background-color: #007bff;
}

.data-table .action-btn:hover {
    opacity: 0.9;
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly darker glassmorphism for headers */
}

.data-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03); /* Even more translucent zebra striping */
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08); /* More translucent hover effect */
}

.news-ticker {
    width: 100%;
    height: 40px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1); /* More translucent glassmorphism background */
    backdrop-filter: blur(10px); /* Increased blur */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 16px 0 rgba( 31, 38, 135, 0.2 ); /* Subtle shadow */
}

.news-ticker-content {
    position: absolute;
    white-space: nowrap;
    animation: ticker-scroll 15s linear infinite;
}

.news-ticker-content p {
    display: inline-block;
    padding-right: 50px;
    margin: 0;
    line-height: 40px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1); /* More translucent glassmorphism background */
    backdrop-filter: blur(15px); /* Increased blur */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Stronger border */
    border-radius: 15px; /* More rounded corners */
    color: white;
    margin: 20px;
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 ); /* Subtle shadow */
}

.logo {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
}

header h1 {
    font-family: Arial, sans-serif;
    margin: 0;
    font-size: 28px;
    color: white;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #c82333;
}

h1 {
    color: #0056b3;
    text-align: center;
    padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: auto;
        margin-left: 20px;
        margin-right: 20px;
        margin-bottom: 20px;
        display: block; /* Ensure sidebar is visible on small screens */
    }

    .content {
        margin-left: 20px;
        max-width: 100%; /* Allow content to take full width */
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: 1;
    }

    .denomination-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .denomination-item {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        font-size: 0.8em;
    }
}

/* Login Page Specific Styles */
body.login-page {
 background: linear-gradient(to right top, #6a11cb, #2575fc); /* A vibrant purple to blue gradient */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 350px;
    max-width: 90%;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.login-container .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 400;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
    outline: none;
}

.login-container button {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.login-container .message {
    color: #dc3545;
    margin-top: 15px;
    font-weight: 500;
}

/* Ensure the main body styles don't interfere with login page */
body:not(.login-page) {
 background: linear-gradient(to right top, #6a11cb, #2575fc); /* A vibrant purple to blue gradient */
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
}

/* Adjustments for the main body if it's not the login page */
body:not(.login-page) .container {
    margin-top: 20px;
}

body:not(.login-page) header {
    margin: 20px;
}

body:not(.login-page) .sidebar {
    margin-left: 20px;
}

body:not(.login-page) .content {
    margin-right: 20px;
}

/* New styles for top navigation */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15); /* Glassmorphism background */
    backdrop-filter: blur(10px); /* Blur effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle border */
    border-radius: 10px; /* Rounded corners */
    padding: 15px 20px;
    margin: 20px auto; /* Center the navbar with some margin */
    max-width: 800px; /* Limit navbar width */
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 ); /* Subtle shadow */
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar ul li {
    margin: 0 15px;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #e0e0e0;
}

/* Responsive adjustments for navbar */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar ul li {
        margin: 5px 0;
    }
}

/* Public Header Styles */
.public-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    padding-top: 20px;
}

.public-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.public-header p {
    font-size: 1.2em;
    opacity: 0.8;
}

/* Specific styles for public history containers */
body .history-container {
    margin: 20px auto; /* Center and add vertical margin */
    max-width: 90%; /* Adjust max-width for public pages */
    color: white; /* Ensure text is visible */
}

body .history-container h2 {
    color: white;
}

body .data-table th,
body .data-table td {
    color: white;
}

body .data-table th {
    background-color: rgba(255, 255, 255, 0.15);
}

body .data-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

body .data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Search container styles for public pages */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px; /* Space between input and button */
}

.search-container input[type="text"] {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1); /* Glassmorphism input */
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    width: 250px; /* Fixed width for search input */
}

.search-container input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7); /* Lighter placeholder text */
}

.search-container button {
    padding: 10px 15px;
    background-color: #007bff; /* Blue search button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    background-color: #0056b3;
}

/* Receipt Styles */
body.receipt-page {
    background: #fcfcfc !important; /* Very light background */
    font-family: 'Calibri', sans-serif; /* Default font from Excel XML */
    color: #000;
}

.receipt-excel-mimic {
    max-width: 700px; /* Adjust as needed for overall width */
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #000; /* Main outer border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0; /* No padding on main container, internal elements will have it */
    box-sizing: border-box;
}

.excel-mimic-header {
    background-color: #305496; /* Dark blue from XML */
    color: #FFFFFF;
    font-size: 36px; /* Large font size from XML */
    font-weight: bold;
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid #000;
}

.excel-mimic-subheader {
    background-color: #203764; /* Darker blue from XML */
    color: #FFFFFF;
    font-size: 11px;
    font-weight: bold;
    padding: 5px 8px;
    border-bottom: 1px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.excel-row-mimic {
    display: flex;
    border-bottom: 1px solid #000;
}

.excel-row-mimic:last-of-type {
    border-bottom: none;
}

.excel-cell-mimic {
    border-right: 1px solid #000;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
    flex: 1;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.excel-cell-mimic:last-child {
    border-right: none;
}

.excel-cell-mimic.half-width {
    flex: 0.5;
}

.excel-cell-mimic.quarter-width {
    flex: 0.25;
}

.excel-cell-mimic.no-border-right {
    border-right: none;
}

.excel-cell-mimic.center-text {
    text-align: center;
    justify-content: center;
}

.excel-cell-mimic.top-align {
    align-items: flex-start;
}

.excel-cell-mimic.white-bg {
    background-color: #FFFFFF;
}

.excel-cell-mimic.black-bg {
    background-color: #000000;
    color: #FFFFFF;
}

.excel-cell-mimic.large-text {
    font-size: 12px;
}

.excel-cell-mimic.italic-text {
    font-style: italic;
}

.excel-cell-mimic.border-bottom-only {
    border-top: none;
    border-left: none;
    border-right: none;
}



.receipt-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 9px;
    color: #000;
    border-top: 1px dashed #ccc;
    padding-top: 8px;
    font-weight: bold;
}

.receipt-actions {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 20px;
}

.receipt-actions button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}

.receipt-actions button.download-btn {
    background-color: #28a745;
}

.receipt-actions button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.receipt-actions button.download-btn:hover {
    background-color: #218838;
}

@media print {
    body.receipt-page {
        background: #fff !important;
    }
    .receipt-actions {
        display: none;
    }
    .receipt-excel-mimic {
        box-shadow: none;
        border: 1px solid #000; /* Keep existing border for other sides */
        border-right: none; /* Remove actual right border to avoid conflict */
        margin: 0;
        padding: 0 5mm; /* Add right padding for print */
        width: 210mm; /* A4 width */
        max-width: 210mm;
        box-sizing: border-box; /* Ensure padding is included in width */
        overflow: hidden; /* Prevent content overflow from affecting borders */
        position: relative; /* Needed for pseudo-element positioning */
    }
    .receipt-excel-mimic::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px; /* Width of the simulated border */
        height: 100%;
        background-color: #000; /* Color of the simulated border */
    }
    .excel-cell-mimic {
        border: 1px solid #000 !important; /* Force all cell borders */
        border-right: 1px solid #000 !important; /* Explicitly ensure right border */
    }
    .excel-cell-mimic.no-border-right {
        border-right: 1px solid #000 !important; /* Ensure right border is present on print */
    }
    .excel-mimic-header,
    .excel-mimic-subheader,
    .excel-deposit-label {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    .photo-section {
        border: 1px dashed #000;
    }
    .receipt-footer {
        border-top-color: #000;
    }

    /* New class for temporary print border */
    .add-print-border-right {
        border-right: 1px solid #000 !important;
    }
}
