/* Shared Styles for E-Commerce Wallet Application */
/* Particles Background & Modern Table Styling */

/* Particles Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Top Right Buttons */
.top-right-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    color: white;
    padding: 10px 12px;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.2s;
}

.home-button {
    background-color: #007bff;
}

.home-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.logout-button {
    background-color: #e74c3c;
}

.logout-button:hover {
    background-color: #c0392b;
    transform: scale(1.1);
}

/* Modern Wrapper */
body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #f6f8fa;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.main-wrapper {
    max-width: 1300px;
    margin: 38px auto 0 auto;
    padding: 22px 22px 38px 22px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 2px 24px rgba(41, 82, 115, 0.10), 0 1.5px 3px rgba(41, 82, 115, 0.07);
    min-height: 82vh;
}

/* Title Bar */
.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 2.1rem;
    color: #2b3947;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: 0.01em;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: #e7f1fd;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 15px 0 0 0;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
}

.action-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
}

.action-bar .filter-group label {
    font-size: 0.95rem;
    color: #165381;
    font-weight: 500;
}

.action-bar select,
.action-bar input[type="text"] {
    padding: 7px 11px;
    border-radius: 6px;
    border: 1.5px solid #ccd6e6;
    background: #f7fafd;
    font-size: 1rem;
    outline: none;
    transition: border .2s;
}

.action-bar input[type="text"]:focus,
.action-bar select:focus {
    border: 1.5px solid #2196f3;
    background: #fff;
}

.action-bar button {
    border: none;
    border-radius: 6px;
    padding: 7px 17px;
    background: #2196f3;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(41, 130, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .17s;
}

.action-bar button.add-btn {
    background: #20c997;
}

.action-bar button:hover {
    background: #1769aa;
}

.action-bar button.add-btn:hover {
    background: #15986b;
}

/* Modern Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 2px 11px rgba(33, 150, 243, 0.07);
    margin-top: 12px;
    min-width: 800px;
}

.modern-table thead {
    background: #e7f1fd;
}

.modern-table th,
.modern-table td {
    padding: 12px 14px;
    font-size: 1rem;
    vertical-align: middle;
    white-space: nowrap;
    text-align: left;
}

.modern-table th {
    background: #e7f1fd;
    font-weight: 600;
    letter-spacing: .01em;
    color: #165381;
    border-bottom: 2px solid #c3d8f7;
}

.modern-table tbody tr:hover {
    background: #f1f9ff;
}

.modern-table td {
    border-bottom: 1px solid #f0f4fa;
}

.modern-table td:last-child,
.modern-table th:last-child {
    text-align: center;
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.table-action-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 1.12em;
    color: #1976d2;
    transition: background 0.13s, color 0.13s;
    display: flex;
    align-items: center;
}

.table-action-btn:hover {
    background: #e3f2fd;
}

.table-action-btn.edit {
    color: #1976d2;
}

.table-action-btn.delete,
.table-action-btn.deactivate {
    color: #e74c3c;
}

.table-action-btn.reactivate,
.table-action-btn.approve {
    color: #20c997;
}

.table-action-btn.save {
    color: #20c997;
}

.table-action-btn.cancel {
    color: #888;
}

.table-action-btn[disabled] {
    color: #bbb;
    cursor: not-allowed;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    background: #eee;
    color: #535b61;
    min-width: 64px;
    text-align: center;
}

.status-badge.active,
.status-badge.status-active {
    background: #d0f6e2;
    color: #15b182;
}

.status-badge.inactive,
.status-badge.status-inactive {
    background: #ffe0e0;
    color: #db2929;
}

.status-badge.pending,
.status-badge.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.approved,
.status-badge.status-approved {
    background: #d0f6e2;
    color: #15b182;
}

.status-badge.rejected,
.status-badge.status-rejected {
    background: #ffe0e0;
    color: #db2929;
}

.status-badge.completed,
.status-badge.status-completed {
    background: #e3f2fd;
    color: #1976d2;
}

/* Responsive Design */
@media (max-width: 900px) {
    .main-wrapper {
        padding: 10px 2vw;
    }
}

@media (max-width: 600px) {
    html,
    body {
        overflow-x: hidden;
    }

    .main-wrapper {
        margin: 12px auto;
        border-radius: 14px;
        padding: 14px;
        min-width: auto;
        max-width: 100%;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-table {
        min-width: auto !important;
        width: 100% !important;
        box-shadow: none;
    }

    .modern-table thead {
        display: none;
    }

    .modern-table,
    .modern-table tbody {
        display: block;
        width: 100%;
    }

    .modern-table tr {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .modern-table td {
        display: block;
        width: 100%;
        text-align: left;
        white-space: normal !important;
        word-break: break-word;
    }

    .modern-table tbody tr {
        position: relative;
        border: 1px solid #e5edf7;
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff, #f9fbff);
        box-shadow: 0 6px 14px rgba(21, 56, 99, .08), 0 2px 4px rgba(21, 56, 99, .06), inset 0 0 0 1px rgba(255, 255, 255, .6);
        padding: 12px 14px 14px;
        margin-bottom: 12px;
    }

    .modern-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.86rem;
        color: #6b7b88;
        margin-bottom: 3px;
        font-weight: 600;
    }

    .modern-table td+td {
        border-top: 1px dashed #eef2f7;
        padding-top: 8px;
    }

    .table-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        border-top: 1px solid #eaeef5;
        padding-top: 8px;
        margin-top: 6px;
    }
}
