* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: 'DM Mono', monospace;
    background: #fff;
    color: #111;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

a {
    color: #111;
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

.account-header {
    background: #fff;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.account-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px
}

.account-header .logo svg {
    width: 28px;
    height: 28px;
    stroke: #111
}

.account-header .user-area {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 0.85rem
}

.account-header .user-area .email {
    color: #555;
    font-weight: 500
}

.account-header .user-area .logout-btn {
    background: #111;
    color: #fff;
    border: 1px solid #111;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
    cursor: pointer;
    transition: opacity 0.15s
}

.account-header .user-area .logout-btn:hover {
    opacity: 0.8
}

.account-main {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 60px auto;
    width: 100%;
    padding: 1.5rem 0 1.5rem 0;
}

.account-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    padding: 1.5rem 0;
    min-height: 400px;
    height: fit-content
}

.account-sidebar .tab-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 1.5rem;
    color: #555;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    cursor: pointer;
    text-decoration: none
}

.account-sidebar .tab-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0
}

.account-sidebar .tab-link:hover {
    color: #000
}

.account-sidebar .tab-link.active {
    color: #000;
    font-weight: 700;
    border-left-color: #111;
}

.account-content {
    flex: 1;
    padding: 0 2rem;
    min-width: 0
}

.account-content .breadcrumb {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1.2rem
}

.account-content .breadcrumb a {
    color: #111;
    font-weight: 600
}

.account-content .breadcrumb span {
    margin: 0 0.3rem
}

.account-content .page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem
}

.message {
    padding: 0.7rem 1rem;
    border: 1px solid;
    max-width: 600px;
    margin-bottom: 1.2rem
}

.message.error {
    background: #fee;
    color: #a00;
    border-color: #f88
}

.message.success {
    background: #efe;
    color: #060;
    border-color: #6c6
}

.dashboard-panel {
    display: none
}

.dashboard-panel.active {
    display: block
}

.dashboard-panel h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem
}

.dashboard-card {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 1.2rem 0.8rem;
    text-align: center
}

.dashboard-card .card-icon {
    display: block;
    margin-bottom: 0.3rem
}

.dashboard-card .card-icon svg {
    width: 28px;
    height: 28px;
    stroke: #111;
    fill: none
}

.dashboard-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin: 0.2rem 0
}

.dashboard-card .value {
    font-size: 18px;
    font-weight: 700;
    margin: 0.2rem 0
}

.dashboard-card .desc {
    font-size: 0.75rem;
    color: #888
}

.rewards-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 400px
}

.rewards-card {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 1.2rem 0.8rem;
    text-align: center
}

.rewards-card .card-icon {
    display: block;
    margin-bottom: 0.3rem
}

.rewards-card .card-icon svg {
    width: 28px;
    height: 28px;
    stroke: #111;
    fill: none
}

.rewards-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin: 0.2rem 0
}

.rewards-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.2rem 0
}

.rewards-card .desc {
    font-size: 0.75rem;
    color: #888
}

.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff
}

th,
td {
    border: 1px solid #eaeaea;
    padding: 0.6rem 0.8rem;
    text-align: left
}

th {
    background: #f5f5f5;
    font-weight: 600
}

tbody tr:nth-child(even) {
    background: #fafafa
}

tbody tr:hover {
    background: #f0f0f0
}

.badge-status {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em
}

.badge-status.paid {
    background: #d1fae5;
    color: #065f46
}

.badge-status.unpaid {
    background: #fee2e2;
    color: #991b1b
}

.badge-status.partial {
    background: #fef3c7;
    color: #92400e
}

.badge-status.completed {
    background: #dbeafe;
    color: #1e40af
}

.badge-status.draft {
    background: #f3f4f6;
    color: #1f2937
}

.badge-status.sent {
    background: #dbeafe;
    color: #1e40af
}

.badge-status.accepted {
    background: #d1fae5;
    color: #065f46
}

.badge-status.rejected {
    background: #fee2e2;
    color: #991b1b
}

.badge-status.expired {
    background: #fef3c7;
    color: #92400e
}

.badge-status.converted {
    background: #e0e7ff;
    color: #3730a3
}

.btn-view {
    background: #111;
    color: #fff;
    border: none;
    padding: 0.25rem 0.8rem;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    transition: opacity 0.15s
}

.btn-view:hover {
    opacity: 0.8
}

.invoice-link {
    font-weight: 600
}

.invoice-link:hover {
    text-decoration: underline
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 2rem 0
}

.auth-container {
    max-width: 480px;
    margin: 0 auto
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #ddd
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.7rem 0;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    background: #fff;
    font-size: 0.9rem
}

.auth-tab.active {
    background: #fff;
    border-bottom-color: #111;
    color: #000
}

.auth-tab:hover {
    background: #fff
}

.auth-panel {
    background: #fff;
    padding: 2rem;
    border: 1px solid #eaeaea;
    border-top: none
}

.auth-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem
}

.auth-panel .auth-sub {
    color: #666;
    margin-bottom: 1.5rem
}

.register-tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.5rem
}

.register-tab {
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    background: transparent
}

.register-tab.active {
    border-bottom-color: #111;
    color: #000
}

.register-tab:hover {
    color: #000
}

.register-form {
    display: none
}

.register-form.active {
    display: block
}

.form-group {
    margin-bottom: 1rem
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    font-family: 'DM Mono', monospace;
    background: #fff;
    transition: border-color 0.2s
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #111
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem
}

.file-upload {
    border: 1px solid #ccc;
    padding: 0.4rem;
    background: #fafafa
}

.file-upload input[type="file"] {
    border: none;
    padding: 0.2rem 0
}

.account-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0 1rem
}

.forgot-link {
    color: #111;
    font-weight: 500;
    cursor: pointer
}

.forgot-link:hover {
    text-decoration: underline
}

.divider {
    border-top: 1px solid #eaeaea;
    margin: 1.5rem 0;
    text-align: center
}

.divider span {
    background: #fff;
    padding: 0 1rem;
    color: #888;
    font-weight: 500
}

button,
.btn,
.submit-btn,
.sign-in-btn,
.register-btn,
.modal-btn {
    background: #111;
    color: #fff;
    border: 1px solid #111;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 0.9rem
}

button:hover,
.btn:hover,
.submit-btn:hover,
.sign-in-btn:hover,
.register-btn:hover,
.modal-btn:hover {
    opacity: 0.85
}

.submit-btn,
.sign-in-btn,
.register-btn {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem
}

.register-btn {
    background: #fff;
    color: #111;
    border: 1px solid #111
}

.register-btn:hover {
    background: #f5f5f5
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    justify-content: center;
    align-items: center
}

.modal-overlay.active {
    display: flex
}

.modal-box {
    background: #fff;
    max-width: 800px;
    width: 95%;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left
}

.logout-modal {
    max-width: 320px;
}

.logout-modal .modal-actions {
    margin-top: 20px;
}

.modal-box h3 {
    font-size: 1.2rem;
    margin-top: 0
}

.modal-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.85rem
}

.modal-box th,
.modal-box td {
    border: 1px solid #eaeaea;
    padding: 0.4rem 0.6rem
}

.modal-box th {
    background: #f5f5f5
}

.modal-btn.cancel {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #111 !important
}

.modal-btn.cancel:hover {
    background: #f5f5f5 !important
}

.checklist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 1.5rem;
    margin: 1rem 0
}

.checklist-grid .item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.2rem 0
}

.checklist-grid .label {
    font-weight: 600
}

.checklist-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem
}

.checklist-header .details {
    flex: 1;
    min-width: 200px
}

.checklist-header .image-wrapper {
    flex: 0 0 auto
}

.product-image-box {
    padding: 0.5rem;
    border: 1px solid #ddd;
    display: inline-block;
    max-width: 220px
}

.product-image-box img {
    max-width: 200px;
    max-height: 200px;
    display: block
}

.product-image-box .no-image {
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.8rem;
    text-align: center
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eaeaea;
    padding: 0.5rem 0;
    z-index: 100;
    justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05)
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.55rem;
    color: #888;
    font-weight: 500;
    text-decoration: none;
    padding: 0.2rem 0.3rem;
    transition: color 0.2s;
    flex: 1;
    text-align: center
}

.mobile-bottom-nav a svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2
}

.mobile-bottom-nav a.active {
    color: #000;
    font-weight: 700
}

@media (max-width:768px) {
    .account-main {
        flex-direction: column;
        padding: 1rem
    }

    .account-sidebar {
        display: none
    }

    .account-content {
        padding: 0
    }

    .mobile-bottom-nav {
        display: flex
    }

    .account-header .user-area .email {
        display: none
    }

    .account-header {
        padding: 0.8rem 1rem
    }

    .dashboard-cards {
        grid-template-columns: 1fr 1fr
    }

    .rewards-box {
        grid-template-columns: 1fr
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem
    }

    .auth-panel {
        padding: 1.5rem
    }

    .table-wrap table thead {
        display: none
    }

    .table-wrap table,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        display: block;
        width: 100%
    }

    .table-wrap tr {
        border: 1px solid #eaeaea;
        margin-bottom: 1rem;
        padding: 0.4rem 0.6rem;
        background: #fafafa
    }

    .table-wrap td {
        border: none;
        padding: 0.3rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee
    }

    .table-wrap td:last-child {
        border-bottom: none
    }

    .table-wrap td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #333;
        margin-right: 1rem;
        font-size: 0.8rem
    }

    .table-wrap td .badge-status {
        font-size: 0.65rem
    }

    .table-wrap td .btn-view {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem
    }

    .checklist-header {
        flex-direction: column
    }

    .product-image-box {
        max-width: 100%;
        text-align: center
    }

    .product-image-box img {
        max-width: 150px;
        margin: 0 auto
    }

    #detailsModal .modal-box .checklist-grid {
        grid-template-columns: 1fr
    }
}

@media (max-width:480px) {
    .dashboard-cards {
        grid-template-columns: 1fr
    }

    .account-header .logo span {
        display: none
    }

    .account-content .page-title {
        font-size: 1.2rem
    }
}

.filter-bar input,
.filter-bar select,
.filter-bar button,
.pagination-controls select,
.pagination-controls button {
    border-radius: 0 !important;
}

.filter-bar select,
.pagination-controls select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 34px;
    cursor: pointer;
}

.filter-bar select::-ms-expand,
.pagination-controls select::-ms-expand {
    display: none;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.filter-bar label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-bar input,
.filter-bar select {
    padding: 6px 10px;
    border: 1px solid #d0d5dd;
    background: #fff;
    font-family: 'DM Mono', monospace;
    font-size: 0.85rem;
    box-sizing: border-box;
    max-width: 100%;
}

.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: #00e676;
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
}

.filter-bar .search-input {
    flex: 1 1 180px;
    min-width: 130px;
}

.filter-bar .date-input {
    width: 130px;
}

.filter-bar .status-select,
.filter-bar .payment-select,
.filter-bar .device-select {
    width: 110px;
}

.filter-bar .clear-btn {
    background: #e0e0e0;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    color: #333;
    transition: background 0.2s;
    white-space: nowrap;
}

.filter-bar .clear-btn:hover {
    background: #ccc;
}

@media (max-width: 900px) and (min-width: 601px) {
    .filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 10px 14px;
    }

    .filter-bar .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        min-width: 0;
    }

    .filter-bar .search-input {
        flex: none;
    }

    .filter-bar .filter-group:has(.search-input),
    .filter-bar .clear-btn {
        grid-column: 1 / -1;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar .search-input,
    .filter-bar .date-input,
    .filter-bar .status-select,
    .filter-bar .payment-select,
    .filter-bar .device-select {
        width: 100%;
        min-width: 0;
    }

    .filter-bar .clear-btn {
        width: 100%;
        padding: 10px 14px;
    }
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 10px 0;
}

.pagination-controls .pagination-info {
    font-size: 0.9rem;
    color: #555;
}

.pagination-controls .pagination-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-controls .pagination-links button {
    padding: 6px 12px;
    border: 1px solid #d0d5dd;
    background: #fff;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 0.85rem;
    color: #333;
    transition: all 0.2s;
}

.pagination-controls .pagination-links button:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #aaa;
}

.pagination-controls .pagination-links button.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.pagination-controls .pagination-links button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-controls .page-size-select {
    padding: 4px 8px;
    border: 1px solid #d0d5dd;
    font-family: 'DM Mono', monospace;
}

@media (max-width: 600px) {
    .filter-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .filter-bar .filter-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }

    .filter-bar label {
        font-size: 0.8rem;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar .search-input,
    .filter-bar .date-input,
    .filter-bar .status-select,
    .filter-bar .payment-select,
    .filter-bar .device-select {
        width: 100%;
        min-width: 0;
        flex: none;
        padding: 10px 12px;
        font-size: 16px;
    }

    .filter-bar .clear-btn {
        width: 100%;
        padding: 12px 14px;
        font-size: 0.9rem;
        margin-top: 2px;
    }

    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }

    .pagination-controls .pagination-info {
        order: 2;
    }

    .pagination-controls .pagination-links {
        order: 1;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination-controls .page-size-select {
        order: 3;
        width: 100%;
        padding: 10px 12px;
        font-size: 16px;
    }

    .pagination-controls .pagination-links button {
        padding: 8px 12px;
        min-width: 38px;
    }

    #detailsModal .modal-box {
        width: 92vw;
        max-width: 92vw;
        max-height: 85vh;
        overflow-y: auto;
        box-sizing: border-box;
    }

    #detailsContent table {
        display: block;
        width: 100%;
        border: none;
        border-collapse: collapse;
    }

    #detailsContent table thead {
        display: none;
    }

    #detailsContent table tbody {
        display: block;
    }

    #detailsContent table tr {
        display: block;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    #detailsContent table tr:last-child {
        margin-bottom: 0;
    }

    #detailsContent table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        text-align: right;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.85rem;
    }

    #detailsContent table td:last-child {
        border-bottom: none;
    }

    #detailsContent table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
        text-align: left;
        flex: none;
        margin-right: auto;
    }
}

.form-group.password-toggle {
    position: relative;
}

.form-group.password-toggle .password-input-wrapper {
    position: relative;
}

.form-group.password-toggle input {
    padding-right: 44px;
}

.form-group.password-toggle .toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    height: auto;
    width: auto;
    line-height: 1;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group.password-toggle .toggle-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.form-group.password-toggle .toggle-btn:hover {
    color: #000;
}

.form-group.password-toggle .password-input-wrapper {
    display: flex;
    align-items: center;
}

.form-group.password-toggle .password-input-wrapper input {
    flex: 1;
}

@media (max-width: 600px) {
    .form-group.password-toggle input {
        padding-right: 44px;
    }
}

.code-inputs {
        display: grid;
        grid-template-columns: repeat(6,1fr);
        gap: 8px;
        margin: 8px 0;
}

.code-inputs input {
        height: 48px;
        text-align: center;
        font-size: 24px;
        font-weight: 600;
        border: 1.5px solid var(--border-input, #ccc);
        background: var(--bg-input, #fff);
        transition: border 0.2s;
        font-family: 'DM Mono', monospace;
}

.code-inputs input:focus {
        outline: none;
        border-color: var(--accent-color, #00a884);
        box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.15);
}