/* Account Pages Styles - Mobile First */

.account-page {
    padding: 40px 0 80px 0;
    background: #f8f9fa;
    min-height: 60vh;
}

/* Auth Container */
.auth-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--black);
}

.auth-subtitle {
    color: var(--text);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--black);
}

.form-input {
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    color: var(--text);
    font-size: 0.85rem;
}

/* Auth Message */
.auth-message {
    min-height: 24px;
    font-size: 0.9rem;
}

.auth-message .error-message {
    color: #dc2626;
    background: #fee2e2;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
}

.auth-message .success-message {
    color: #059669;
    background: #d1fae5;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #059669;
}

/* Button */
.btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
}

/* Auth Links */
.auth-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    text-align: center;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.auth-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Account Dashboard */
.account-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.account-header {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.account-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--black);
}

.account-header p {
    color: var(--text);
    font-size: 0.95rem;
}

.customer-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

.customer-badge.wholesale {
    background: #f59e0b;
}

/* Account Grid */
.account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.account-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.account-card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--black);
}

.account-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Order List */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: border-color 0.2s;
}

.order-item:hover {
    border-color: var(--primary);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.order-number {
    font-weight: 700;
    color: var(--black);
    font-size: 1rem;
}

.order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.order-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.order-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--black);
}

.empty-state p {
    margin-bottom: 25px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text);
}

/* Incomplete Orders */
.incomplete-orders-card {
    border: 2px solid #fbbf24;
    background: #fffbeb;
}

.incomplete-orders-card h2 {
    color: #92400e;
}

.incomplete-order-item {
    background: white;
}

.order-status.arranging-payment {
    background: #fef3c7;
    color: #92400e;
}

/* Address List */
.address-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address-item {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: border-color 0.2s;
}

.address-item:hover {
    border-color: var(--primary);
}

.address-content {
    flex: 1;
}

.address-name {
    font-weight: 700;
    color: var(--black);
    font-size: 1rem;
    margin-bottom: 4px;
}

.address-company {
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.address-details {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.address-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.address-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.address-badge.shipping {
    background: #dbeafe;
    color: #1e40af;
}

.address-badge.billing {
    background: #fce7f3;
    color: #9f1239;
}

.address-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Button Small */
.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--black);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-content form {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-message {
    min-height: 24px;
    margin-top: 15px;
}

.form-message .error-message {
    color: #dc2626;
    background: #fee2e2;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
}

.form-message .success-message {
    color: #059669;
    background: #d1fae5;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #059669;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .account-page {
        padding: 60px 0 80px 0;
    }

    .auth-card {
        padding: 40px;
    }

    .auth-card h1 {
        font-size: 2rem;
    }

    .auth-links {
        flex-direction: row;
        justify-content: space-between;
    }

    .account-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .order-header {
        flex-wrap: nowrap;
    }

    .order-details {
        flex-direction: row;
        gap: 20px;
    }

    .address-item {
        flex-direction: row;
    }

    .address-actions {
        flex-direction: column;
        flex-shrink: 0;
    }

    .modal-content {
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    .account-header {
        padding: 35px;
    }

    .account-header h1 {
        font-size: 2.2rem;
    }
}

/* Invoices Page */
.invoices-content {
    margin-top: 30px;
}

.invoices-table {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.invoices-table-header {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 1fr 1fr;
    gap: 15px;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.invoice-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 1fr 1fr;
    gap: 15px;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
    transition: background 0.2s;
}

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

.invoice-row:hover {
    background: #f8f9fa;
}

.invoice-col-number strong {
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.invoice-col-order {
    color: var(--text);
}

.invoice-col-date {
    color: var(--text);
}

.invoice-col-amount {
    font-weight: 700;
    color: var(--black);
}

.invoice-col-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .invoices-table-header {
        display: none;
    }

    .invoice-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 20px;
    }

    .invoice-row > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .invoice-row > div::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text);
        font-size: 0.85rem;
    }

    .invoice-col-number::before {
        content: 'Factuurnummer:';
    }

    .invoice-col-order::before {
        content: 'Bestelling:';
    }

    .invoice-col-date::before {
        content: 'Datum:';
    }

    .invoice-col-amount::before {
        content: 'Bedrag:';
    }

    .invoice-col-actions {
        justify-content: stretch;
        margin-top: 10px;
    }

    .invoice-col-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
