/* ============================================
   Customer Portal Styles
   Neutral, clean design with lots of white
   ============================================ */

/* Base Layout */
body.customer-portal {
    background-color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3748;
}

.portal-container {
    min-height: 100vh;
    padding: 2rem 0;
}

/* Cards */
.portal-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.portal-card-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.portal-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.portal-card-subtitle {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
}

/* Buttons */
.btn-portal-primary {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-portal-primary:hover {
    background-color: #2d3748;
    border-color: #2d3748;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-portal-secondary {
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    color: #4a5568;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-portal-secondary:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
    color: #2d3748;
}

.btn-portal-success {
    background-color: #48bb78;
    border-color: #48bb78;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
}

.btn-portal-success:hover {
    background-color: #38a169;
    border-color: #38a169;
    color: #ffffff;
}

.btn-portal-danger {
    background-color: #f56565;
    border-color: #f56565;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
}

.btn-portal-danger:hover {
    background-color: #e53e3e;
    border-color: #e53e3e;
    color: #ffffff;
}

/* Forms */
.portal-form-group {
    margin-bottom: 1.5rem;
}

.portal-form-label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.portal-form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background-color: #ffffff;
}

.portal-form-control:focus {
    border-color: #4a5568;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.1);
}

.portal-form-text {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
}

/* Alerts */
.portal-alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.portal-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.portal-alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.portal-alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.portal-alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Status Pages */
.portal-status-page {
    text-align: center;
    padding: 3rem 1rem;
}

.portal-status-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.portal-status-icon.success {
    color: #48bb78;
}

.portal-status-icon.error {
    color: #f56565;
}

.portal-status-icon.warning {
    color: #ed8936;
}

.portal-status-icon.info {
    color: #4299e1;
}

.portal-status-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.portal-status-message {
    font-size: 1.125rem;
    color: #718096;
    margin-bottom: 2rem;
}

/* Tables */
.portal-table {
    width: 100%;
    margin-bottom: 1rem;
}

.portal-table thead {
    background-color: #f7fafc;
}

.portal-table th {
    padding: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.portal-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.portal-table tbody tr:hover {
    background-color: #f7fafc;
}

/* Badges */
.portal-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.portal-badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.portal-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.portal-badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.portal-badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.portal-badge-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

/* Image Upload */
.portal-upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s;
    background-color: #ffffff;
    cursor: pointer;
}

.portal-upload-zone:hover,
.portal-upload-zone.dragover {
    border-color: #4a5568;
    background-color: #f7fafc;
}

.portal-upload-zone-icon {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 1rem;
}

.portal-upload-zone-text {
    color: #718096;
    font-size: 1rem;
}

.portal-upload-zone-hint {
    color: #a0aec0;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Image Preview */
.portal-image-preview {
    display: inline-block;
    position: relative;
    margin: 0.5rem;
}

.portal-image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.portal-image-preview-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #f56565;
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    border: 2px solid #ffffff;
}

.portal-image-preview-delete:hover {
    background-color: #e53e3e;
}

/* Progress Bar */
.portal-progress {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.portal-progress-bar {
    height: 100%;
    background-color: #4a5568;
    transition: width 0.3s;
}

/* Loading Spinner */
.portal-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e2e8f0;
    border-top-color: #4a5568;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .portal-container {
        padding: 1rem 0;
    }

    .portal-card {
        padding: 1.5rem;
        border-radius: 0;
    }

    .portal-card-title {
        font-size: 1.25rem;
    }

    .btn-portal-primary,
    .btn-portal-secondary,
    .btn-portal-success,
    .btn-portal-danger {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .portal-table {
        font-size: 0.875rem;
    }

    .portal-table th,
    .portal-table td {
        padding: 0.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Character Counter */
.portal-char-counter {
    font-size: 0.875rem;
    color: #718096;
    text-align: right;
    margin-top: 0.25rem;
}

.portal-char-counter.warning {
    color: #ed8936;
}

.portal-char-counter.danger {
    color: #f56565;
}

/* Address Cards */
.portal-address-card {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.portal-address-card h6 {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.portal-address-card p {
    margin: 0;
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Section Headers */
.portal-section-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.portal-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

/* Utilities */
.text-neutral {
    color: #718096;
}

.text-neutral-dark {
    color: #4a5568;
}

.text-neutral-darker {
    color: #2d3748;
}

.bg-neutral-light {
    background-color: #f7fafc;
}

.border-neutral {
    border-color: #e2e8f0;
}
