/* Reset et base */
.ecm-login-container *,
.ecm-customer-area * {
    box-sizing: border-box;
}

/* Login Form Styles */
.ecm-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 20px;
}

.ecm-login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.ecm-login-logo {
    background: #000;
    padding: 30px;
    margin: -40px -40px 30px;
    border-radius: 12px 12px 0 0;
}

.ecm-login-logo img {
    height: 50px;
    width: auto;
}

.ecm-login-box h2 {
    color: #000;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 600;
}

.ecm-login-form {
    text-align: left;
}

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

.ecm-form-group input[type="text"],
.ecm-form-group input[type="password"],
.ecm-form-group input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.ecm-form-group input:focus {
    outline: none;
    border-color: #000;
    background: #fff;
}

.ecm-remember {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.ecm-remember input[type="checkbox"] {
    margin-right: 8px;
}

.ecm-btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.ecm-btn-primary {
    background: #000;
    color: #fff;
    width: 100%;
}

.ecm-btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.ecm-btn-outline {
    background: transparent;
    color: #000;
    border: 2px solid #000;
}

.ecm-btn-outline:hover {
    background: #000;
    color: #fff;
}

.ecm-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.ecm-form-links {
    text-align: center;
    margin-top: 20px;
}

.ecm-form-links a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
}

.ecm-form-links a:hover {
    color: #000;
    text-decoration: underline;
}

.ecm-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
}

.ecm-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.ecm-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Customer Area Styles */
.ecm-customer-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ecm-customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ecm-customer-header h1 {
    font-size: 28px;
    color: #000;
    margin: 0;
}

/* Tabs */
.ecm-customer-tabs {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.ecm-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    top: 2px;
}

.ecm-tab:hover {
    color: #000;
}

.ecm-tab.active {
    color: #000;
    border-bottom-color: #000;
}

.ecm-tab svg {
    width: 20px;
    height: 20px;
}

/* Tables */
.ecm-table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.ecm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ecm-table thead {
    background: #f8f8f8;
}

.ecm-table th {
    text-align: left;
    padding: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.ecm-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.ecm-table tbody tr:hover {
    background: #fafafa;
}

/* Status */
.ecm-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.ecm-status-completed,
.ecm-status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.ecm-status-processing,
.ecm-status-sent {
    background: #e3f2fd;
    color: #1565c0;
}

.ecm-status-pending,
.ecm-status-on-hold {
    background: #fff3e0;
    color: #e65100;
}

.ecm-status-cancelled,
.ecm-status-failed {
    background: #ffebee;
    color: #c62828;
}

/* Account Info */
.ecm-account-info {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.ecm-info-group {
    margin-bottom: 20px;
}

.ecm-info-group:last-child {
    margin-bottom: 0;
}

.ecm-info-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.ecm-info-group p {
    margin: 0;
    font-size: 16px;
    color: #000;
}

.ecm-account-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Loading & Messages */
.ecm-loading {
    text-align: center;
    padding: 60px 20px;
}

.ecm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ecm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.ecm-error {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.ecm-notice {
    background: #f0f0f0;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    color: #666;
}

/* Invoices */
.ecm-invoice-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.ecm-invoice-item:hover {
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ecm-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.ecm-invoice-number {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.ecm-invoice-status {
    font-size: 14px;
}

.ecm-invoice-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ecm-invoice-detail {
    display: flex;
    flex-direction: column;
}

.ecm-invoice-detail span:first-child {
    color: #666;
    margin-bottom: 3px;
}

.ecm-invoice-detail span:last-child {
    color: #000;
    font-weight: 500;
}

.ecm-invoice-actions {
    display: flex;
    gap: 10px;
}

/* Orders List Styles */
.ecm-orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ecm-order-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ecm-order-item:hover {
    border-color: #000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.ecm-order-header {
    background: #f8f8f8;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecm-order-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #000;
}

.ecm-order-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.ecm-order-status-total {
    text-align: right;
}

.ecm-order-total {
    margin: 10px 0 0 0;
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

/* Products in Order */
.ecm-order-products {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.ecm-product-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ecm-product-item:last-child {
    border-bottom: none;
}

.ecm-product-image-wrapper {
    flex-shrink: 0;
}

.ecm-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.ecm-product-image.ecm-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 12px;
    text-align: center;
}

.ecm-product-details {
    flex: 1;
}

.ecm-product-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #000;
    font-weight: 500;
}

.ecm-product-meta {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
}

.ecm-product-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.ecm-product-qty {
    color: #666;
}

.ecm-product-price {
    font-weight: 600;
    color: #000;
}

/* Order Footer */
.ecm-order-footer {
    background: #f8f8f8;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.ecm-order-details {
    flex: 1;
}

.ecm-order-details p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.ecm-order-details strong {
    color: #000;
}

.ecm-order-totals {
    min-width: 250px;
}

.ecm-order-subtotal,
.ecm-order-shipping,
.ecm-order-tax {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.ecm-order-total-final {
    display: flex;
    justify-content: space-between;
    padding: 15px 0 0 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .ecm-customer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .ecm-customer-tabs {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .ecm-tab {
        font-size: 14px;
    }
    
    .ecm-table {
        font-size: 14px;
    }
    
    .ecm-table thead {
        display: none;
    }
    
    .ecm-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
    }
    
    .ecm-table td {
        display: block;
        padding: 8px 0;
        border: none;
    }
    
    .ecm-table td:before {
        content: attr(data-label);
        display: inline-block;
        font-weight: 600;
        margin-right: 10px;
        min-width: 100px;
    }
    
    .ecm-invoice-header {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Orders Responsive */
    .ecm-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ecm-order-status-total {
        text-align: left;
    }
    
    .ecm-product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .ecm-product-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .ecm-product-price-qty {
        flex-direction: column;
        gap: 5px;
    }
    
    .ecm-order-footer {
        flex-direction: column;
    }
    
    .ecm-order-totals {
        min-width: auto;
        border-top: 1px solid #e0e0e0;
        padding-top: 15px;
    }
}