:root {
    --bg-light: #f4f7f9;
    --sidebar-dark: #2c3e50;
    --sidebar-active: #34495e;
    --primary-blue: #3182ce;
    --text-main: #2d3748;
    --text-muted: #718096;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow-x: hidden;
}

select {
    padding: 10px !important;
}

.header-row {
    background: white;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1001;
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--sidebar-dark);
    padding: 10px 15px;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-dark);
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.logo {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: white;
}

.logo img {
    width: 100%;
}

.logo-text {
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.logo-subtext {
    font-size: 0.6rem;
    margin: 0;
    color: var(--primary-blue);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

nav li {
    padding: 12px 25px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

nav li i {
    margin-right: 15px;
    width: 20px;
}

nav li:hover,
nav li.active {
    background-color: var(--sidebar-active);
    border-left: 4px solid var(--primary-blue);
    color: white;
}

nav li a {
    text-decoration: none;
    color: inherit;
}

nav a {
    text-decoration: none;
    color: inherit;
}

.bottom-nav {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 35px;
}

.user-profile {
    margin-right: 30px;
}

.user-profile a {
    text-decoration: none;
    color: inherit;
}

.avatar {
    border-radius: 50%;
}

/* Dashboard Content */
.dashboard {
    padding: 25px;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    /* display: flex; */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* flex-direction: row; */
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 20px 0 0 0;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.icon-blue {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
}

.card-footer {
    background: #f8fafc;
    padding: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid #edf2f7;
}

.card-footer.link {
    color: var(--primary-blue);
    cursor: pointer;
}

/* Actions */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.view-all {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.85rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.action-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.action-info i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.action-info h4 {
    margin: 0;
}

.action-info p {
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: white !important;
}

.btn-primary,
.btn-secondary {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: white !important;
}

.form-check-input:checked {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

.page-link {
    color: var(--primary-blue) !important;
}

.page-item.active .page-link {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: white !important;
}

.btn-light {
    background: #edf2f7 !important;
    color: var(--text-main) !important;
}

.passworEye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Table */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 15px;
    background: #fff;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-bottom: 1px solid #edf2f7;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.card-title {
    font-size: 20px !important;
    font-weight: bold;
}

@media (min-width: 1420px) {
    .col-md-2 {
        width: 12% !important;
    }

    .col-md-10 {
        width: 88% !important;
    }
}

@media (min-width: 1000px) {
    .action-card {
        max-width: 525px;
    }

    .stat-card {
        max-width: 525px;
    }
}

@media (max-width: 991px) {
    .form-group {
        margin-bottom: 5px;
    }

    .form-group .col-lg {
        margin-bottom: 20px;
    }
}

/* Responsive Layout */
@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .header-row {
        justify-content: space-between;
        padding: 0 10px;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed !important;
        top: 55px;
        left: -100%;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .card {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .card-body {
        padding: 15px !important;
        max-width: 100%;
    }

    .logo {
        border-bottom: none;
        padding: 5px 0;
    }

    .logo img {
        width: 150px !important;
    }

    .top-header {
        margin-left: 0;
        padding: 0 10px;
    }

    .top-header h3 {
        font-size: 1.1rem;
        margin: 0;
    }

    nav ul {
        display: block;
        margin: 10px 0;
    }

    nav li {
        padding: 25px 25px;
    }

    nav li.active {
        background-color: var(--sidebar-active);
        border-left: 4px solid var(--primary-blue);
        border-bottom: none;
    }

    .bottom-nav {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Grid Adjustments */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 25px;
    }

    .stat-card {
        padding: 15px 0 0 0;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .actions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dashboard {
        padding: 15px;
    }

    /* Table Responsiveness */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th,
    td {
        white-space: nowrap;
        padding: 12px 10px;
    }

    .form-group .col-lg {
        padding: 0 !important;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .col-12 {
        padding: 0 !important;
    }

    .dashboard {
        padding: 5px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-row .logo img {
        width: 130px !important;
    }
}

/* Toast Styles */
.toast-container {
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 300px;
    border: none;
    margin-bottom: 20px;
}

.toast.show {
    animation: slideInRight 0.3s ease-out forwards;
}

.toast-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
}

.toast-body {
    padding: 15px;
    font-size: 0.9rem;
    color: var(--text-main);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.toast.hiding {
    animation: fadeOut 0.3s ease-out forwards;
}
/* Whish Receipt Styles */
.whish-receipt-wrapper {
    background-color: #f4f5f7;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.whish-receipt-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    position: relative;
}

.whish-logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.whish-logo-container img {
    max-width: 45%;
    max-height: 50px;
    object-fit: contain;
}

.whish-receipt-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: bold;
}

.whish-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}

.whish-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
    color: #4a4a4a;
}

.whish-row.bold {
    font-weight: bold;
    color: #2c3e50;
}

.whish-divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 20px 0;
}

.btn-download {
    background-color: var(--primary-blue);
    color: #FFFFFF;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-download:hover {
    background-color: var(--primary-blue);
}

@media print {
    /* Hide everything by default */
    body * {
        visibility: hidden !important;
    }

    /* Show only receipt elements and their parents */
    #receiptModal, #receiptModal *,
    .whish-receipt-wrapper, .whish-receipt-wrapper *,
    .omt-receipt-wrapper, .omt-receipt-wrapper *,
    .card-receipt-wrapper, .card-receipt-wrapper * {
        visibility: visible !important;
    }

    /* Reset body and containers for full-page print */
    body, html {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Position the receipt at the top of the page, bypassing any layout offsets */
    .whish-receipt-wrapper, .omt-receipt-wrapper, .card-receipt-wrapper {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        min-height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: white !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        z-index: 99999 !important;
    }

    /* Reset potential layout offsets from the main theme */
    .main-content, .page-content, .wrapper, .page-wrapper, .content-page {
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
        position: static !important;
    }

    .whish-receipt-card, .omt-receipt-card, .card-receipt-card {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 600px !important;
        padding: 20px !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Modal-specific print fixes - Reset EVERYTHING Bootstrap might use for centering */
    #receiptModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    #receiptModal .modal-dialog {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        transform: none !important;
        display: block !important;
        min-height: auto !important;
    }

    #receiptModal .modal-content {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        display: block !important;
    }

    #receiptModal .modal-body {
        padding: 0 !important;
        display: block !important;
    }

    /* Hide non-essential UI elements */
    .no-print, 
    .modal-footer, 
    .modal-header .close, 
    .btn, 
    .navbar, 
    .sidebar-wrapper,
    .footer,
    .modal-backdrop {
        display: none !important;
    }
}

/* OMT Receipt Styles */
.omt-receipt-wrapper {
    background-color: #f4f5f7;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.omt-receipt-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    position: relative;
}

.omt-logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.omt-logo-container img {
    max-width: 45%;
    max-height: 50px;
    object-fit: contain;
}

.omt-receipt-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: bold;
}

.omt-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}

.omt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
    color: #4a4a4a;
}

.omt-row.bold {
    font-weight: bold;
    color: #2c3e50;
}

.omt-divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 20px 0;
}



/* Card Receipt Styles */
.card-receipt-wrapper {
    background-color: #f4f5f7;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.card-receipt-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    position: relative;
}

.card-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.card-logo-container img {
    max-width: 60%;
    max-height: 60px;
    object-fit: contain;
}

.card-receipt-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
    color: #4a4a4a;
}

.card-row.bold {
    font-weight: bold;
    color: #2c3e50;
}

.card-divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 20px 0;
}



