/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wmp-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.wmp-nav {
    display: flex;
    justify-content: space-around;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wmp-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.wmp-nav-item svg {
    margin-bottom: 4px;
}

.wmp-nav-item span {
    font-size: 12px;
}

.wmp-nav-item:hover,
.wmp-nav-item.active {
    color: #2271b1;
    background: #f0f6fc;
}

/* Container */
.wmp-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Login Page */
.wmp-login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wmp-login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.wmp-login-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #2271b1;
    text-align: center;
}

.wmp-login-box h2 {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
    text-align: center;
    font-weight: 400;
}

.wmp-error {
    background: #dc3545;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wmp-form-group {
    margin-bottom: 20px;
}

.wmp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.wmp-form-group input[type="text"],
.wmp-form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.wmp-form-group input[type="text"]:focus,
.wmp-form-group input[type="password"]:focus {
    outline: none;
    border-color: #2271b1;
}

.wmp-checkbox label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.wmp-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.wmp-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.wmp-button-primary {
    background: #2271b1;
    color: #fff;
    width: 100%;
}

.wmp-button-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wmp-button-complete {
    background: #28a745;
    color: #fff;
    width: 100%;
    margin-top: 10px;
}

.wmp-button-complete:hover {
    background: #218838;
}

.wmp-button-complete:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Search Section */
.wmp-search-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.wmp-search-section h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.wmp-search-form {
    display: flex;
    gap: 10px;
}

.wmp-search-form input {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.wmp-search-form input:focus {
    outline: none;
    border-color: #2271b1;
}

.wmp-search-form button {
    min-width: 80px;
}

/* Stats Section */
.wmp-stats-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wmp-stats-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.wmp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.wmp-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wmp-stat-method {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.wmp-stat-count {
    font-size: 32px;
    font-weight: 700;
}

/* Results Section */
.wmp-results-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wmp-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.wmp-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Order List */
.wmp-order-list h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

/* Order Table */
.wmp-order-table {
    overflow-x: auto;
    margin-bottom: 20px;
}

.wmp-order-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.wmp-order-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.wmp-order-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.wmp-order-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px;
}

.wmp-order-table th.sortable:hover {
    background: #e9ecef;
}

.wmp-order-table th .sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.wmp-order-table th .sort-arrow::before {
    content: '↕';
    font-size: 14px;
}

.wmp-order-table th.sort-asc .sort-arrow {
    opacity: 1;
}

.wmp-order-table th.sort-asc .sort-arrow::before {
    content: '↑';
}

.wmp-order-table th.sort-desc .sort-arrow {
    opacity: 1;
}

.wmp-order-table th.sort-desc .sort-arrow::before {
    content: '↓';
}

.wmp-order-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
    cursor: pointer;
}

.wmp-order-table tbody tr:hover {
    background: #f8f9fa;
}

.wmp-order-table tbody tr.status-completed {
    border-left: 4px solid #dc3545;
}

.wmp-order-table tbody tr.status-processing {
    border-left: 4px solid #28a745;
}

.wmp-order-table td {
    padding: 12px 10px;
    vertical-align: middle;
}

.wmp-order-table .wmp-order-number a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
}

.wmp-order-table .wmp-order-number a:hover {
    text-decoration: underline;
}

.wmp-order-table .wmp-order-customer {
    font-weight: 500;
    color: #333;
}

.wmp-order-table .wmp-order-phone {
    color: #666;
    white-space: nowrap;
}

.wmp-order-table .wmp-order-qty {
    text-align: center;
    font-weight: 600;
    color: #2271b1;
}

.wmp-order-table .wmp-order-shipping {
    color: #666;
}

.wmp-order-table .wmp-order-student-rep {
    color: #666;
}

/* Responsive table for mobile */
@media (max-width: 768px) {
    .wmp-order-table table {
        font-size: 13px;
    }

    .wmp-order-table th,
    .wmp-order-table td {
        padding: 10px 6px;
    }

    .wmp-order-table th:nth-child(3),
    .wmp-order-table td:nth-child(3) {
        display: none;
    }
}

.wmp-order-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wmp-order-item.status-completed {
    border-left-color: #dc3545;
}

.wmp-order-item.status-processing {
    border-left-color: #28a745;
}

.wmp-order-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wmp-order-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.wmp-order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.wmp-order-status.status-completed {
    background: #dc3545;
    color: #fff;
}

.wmp-order-status.status-processing {
    background: #28a745;
    color: #fff;
}

.wmp-order-info {
    margin-bottom: 12px;
}

.wmp-order-number {
    font-size: 18px;
    margin-bottom: 6px;
    color: #2271b1;
}

.wmp-order-customer {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
}

.wmp-order-address,
.wmp-order-phone,
.wmp-order-shipping {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.wmp-order-items {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.wmp-order-items strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.wmp-order-items ul {
    list-style: none;
    padding: 0;
}

.wmp-order-items li {
    padding: 6px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wmp-item-sku {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.wmp-item-name {
    flex: 1;
}

.wmp-item-qty {
    font-weight: 500;
    color: #2271b1;
}

.wmp-order-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Single Order View */
.wmp-single-order .wmp-order-item {
    font-size: 16px;
}

.wmp-single-order .wmp-order-number {
    font-size: 22px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .wmp-container {
        padding: 15px 12px;
    }

    .wmp-search-section,
    .wmp-stats-section,
    .wmp-results-section {
        padding: 16px;
    }

    .wmp-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .wmp-stat-count {
        font-size: 28px;
    }

    .wmp-order-item {
        padding: 14px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.wmp-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Success Message */
.wmp-success-message {
    background: #28a745;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

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

/* Error Message */
.wmp-error-message {
    background: #dc3545;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

/* Home Page Styles */
.wmp-page-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.wmp-status-section {
    margin-bottom: 30px;
}

.wmp-status-header {
    font-size: 20px;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    color: #fff;
    font-weight: 600;
    text-transform: capitalize;
}

.wmp-status-header.wmp-status-processing {
    background: #28a745;
}

.wmp-status-header.wmp-status-completed {
    background: #dc3545;
}

.wmp-status-header.wmp-status-on-hold {
    background: #ffc107;
    color: #333;
}

.wmp-status-header.wmp-status-pending {
    background: #6c757d;
}

.wmp-shipping-methods {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.wmp-method-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wmp-method-row:last-child {
    border-bottom: none;
}

.wmp-method-row:hover {
    background: #f8f9fa;
}

.wmp-method-name {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.wmp-method-count {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    margin-right: 12px;
}

.wmp-method-arrow {
    font-size: 24px;
    color: #999;
}

/* Method Orders Page */
.wmp-method-orders {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.wmp-method-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.wmp-back-button {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wmp-back-button:hover {
    background: #5a6268;
}

.wmp-method-header h3 {
    flex: 1;
    font-size: 20px;
    color: #333;
    margin: 0;
}

.wmp-order-count {
    font-size: 14px;
    color: #666;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
}

.wmp-method-order-row {
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wmp-method-order-row:last-child {
    border-bottom: none;
}

.wmp-method-order-row:hover {
    background: #f8f9fa;
}

.wmp-order-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wmp-order-number-link a {
    font-size: 16px;
    font-weight: 600;
    color: #2271b1;
    text-decoration: none;
}

.wmp-order-number-link a:hover {
    text-decoration: underline;
}

.wmp-order-name {
    font-size: 15px;
    color: #333;
}

.wmp-order-phone-qty {
    font-size: 14px;
    color: #666;
}

.wmp-order-detail {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wmp-order-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.wmp-order-meta strong {
    color: #333;
}

.wmp-order-pickup {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    padding: 8px 12px;
    background: #e8f5e9;
    border-left: 3px solid #28a745;
    border-radius: 4px;
}

.wmp-order-pickup strong {
    color: #28a745;
}

.wmp-order-completed-by {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
    padding: 8px 12px;
    background: #e8f0fe;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
}

.wmp-order-completed-by strong {
    color: #2271b1;
}

/* Pickup Person Modal */
.wmp-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.wmp-modal.active {
    display: flex;
}

.wmp-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.wmp-modal-content h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.wmp-modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 20px;
}

.wmp-modal-content input:focus {
    outline: none;
    border-color: #2271b1;
}

.wmp-modal-buttons {
    display: flex;
    gap: 10px;
}

.wmp-modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wmp-modal-confirm {
    background: #28a745;
    color: #fff;
}

.wmp-modal-confirm:hover {
    background: #218838;
}

.wmp-modal-cancel {
    background: #6c757d;
    color: #fff;
}

.wmp-modal-cancel:hover {
    background: #5a6268;
}

/* Batch Selection Checkbox Column */
.wmp-checkbox-col {
    width: 40px;
    text-align: center;
    padding: 8px !important;
}

.wmp-checkbox-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.wmp-batch-checkbox {
    cursor: pointer;
}

/* Batch Summary */
.wmp-batch-summary {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

#wmp-batch-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.wmp-batch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.wmp-batch-item-sku {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.wmp-batch-item-qty {
    font-weight: 700;
    color: #2271b1;
    font-size: 18px;
    white-space: nowrap;
    margin-left: 15px;
}

@media (max-width: 768px) {
    #wmp-batch-items-list {
        grid-template-columns: 1fr;
    }
}

/* Batch Actions */
.wmp-batch-actions {
    padding: 20px 0 0 0;
    text-align: center;
}

.wmp-button-batch-complete {
    background: #28a745;
    color: #fff;
    padding: 14px 32px;
    min-width: 250px;
    font-size: 16px;
    font-weight: 600;
}

.wmp-button-batch-complete:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.wmp-button-batch-complete:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Stats Page Styles */
.wmp-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wmp-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
}

.wmp-stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.wmp-stat-value {
    font-size: 32px;
    font-weight: 700;
}

.wmp-stats-table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-bottom: 20px;
}

.wmp-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wmp-stats-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.wmp-stats-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.wmp-stats-table th.wmp-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 35px;
}

.wmp-stats-table th.wmp-sortable:hover {
    background: #e9ecef;
}

.wmp-stats-table th .wmp-sort-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.wmp-stats-table th .wmp-sort-arrow::before {
    content: '↕';
    font-size: 16px;
}

.wmp-stats-table th.sort-asc .wmp-sort-arrow {
    opacity: 1;
}

.wmp-stats-table th.sort-asc .wmp-sort-arrow::before {
    content: '↑';
}

.wmp-stats-table th.sort-desc .wmp-sort-arrow {
    opacity: 1;
}

.wmp-stats-table th.sort-desc .wmp-sort-arrow::before {
    content: '↓';
}

.wmp-stats-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.wmp-stats-table tbody tr:hover {
    background: #f8f9fa;
}

.wmp-stats-table tbody tr:last-child {
    border-bottom: none;
}

.wmp-stats-table td {
    padding: 15px 20px;
    vertical-align: middle;
}

.wmp-stats-table tfoot {
    background: #f8f9fa;
    border-top: 3px solid #2271b1;
}

.wmp-stats-table tfoot tr.wmp-stats-totals {
    font-size: 16px;
}

.wmp-stats-table tfoot td {
    padding: 18px 20px;
    color: #2271b1;
}

.wmp-stats-table .wmp-product-name {
    font-weight: 500;
    color: #333;
}

.wmp-text-center {
    text-align: center;
}

.wmp-text-right {
    text-align: right;
}

.wmp-stats-note {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .wmp-stats-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .wmp-stat-box {
        padding: 20px 15px;
    }

    .wmp-stat-value {
        font-size: 28px;
    }

    .wmp-stats-table {
        font-size: 13px;
    }

    .wmp-stats-table th,
    .wmp-stats-table td {
        padding: 12px 15px;
    }
}
