/* Dashboard Sections Styles */

/* Profile Section */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.profile-header h3 {
    margin: 0;
    color: #0F3057;
    font-size: 1.75rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.profile-field {
    margin-bottom: 1rem;
}

.profile-field label {
    display: block;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.profile-field p {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.verified {
    background: #d4edda;
    color: #155724;
}

.status-badge.unverified {
    background: #f8d7da;
    color: #721c24;
}

/* Link-style button */
.btn-link {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.btn-link:disabled {
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: none;
}

/* Profile Edit Form */
.profile-edit {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0F3057;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Orders Section */
.orders-container {
    max-width: 1000px;
    margin: 0 auto;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.orders-header h3 {
    margin: 0;
    color: #0F3057;
    font-size: 1.75rem;
}

.orders-count {
    color: #6c757d;
    font-size: 0.875rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.order-info h4 {
    margin: 0 0 0.5rem 0;
    color: #0F3057;
}

.order-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.order-items {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.order-item:last-child {
    border-bottom: none;
}

.item-title {
    font-weight: 500;
    color: #333;
}

.item-type {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
}

.item-price {
    font-weight: 600;
    color: #0F3057;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-total {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.order-total strong {
    font-size: 1.25rem;
    color: #0F3057;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
}

/* Order Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
}

.status-default {
    background: #e9ecef;
    color: #6c757d;
}

/* Order Details Modal */
.order-details-modal {
    max-width: 600px;
    margin: 0 auto;
}

.order-details-modal h3 {
    margin-bottom: 1.5rem;
    color: #0F3057;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row label {
    font-weight: 600;
    color: #6c757d;
}

.order-items-detail {
    margin: 1rem 0;
}

.order-item-detail {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.item-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.item-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.order-total-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 2px solid #0F3057;
    margin-top: 1rem;
    font-size: 1.25rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Loading States */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0F3057;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-container {
    text-align: center;
    padding: 2rem;
    background: #f8d7da;
    border-radius: 8px;
    color: #721c24;
}

.error-container i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Button Styles */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: #0F3057;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #0a1f3a;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header,
    .orders-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .order-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .order-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions button {
        width: 100%;
    }
}

/* Utility Classes */
.monospace {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* API Loading Indicator */
.api-loading-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #0F3057;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.api-loading-indicator.active {
    display: flex;
}

.api-loading-indicator .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    max-width: 300px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.debug-panel.active {
    display: block;
}

.debug-panel h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #0F3057;
}

.debug-log {
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.4;
}

.debug-log .log-entry {
    margin-bottom: 5px;
    padding: 2px 0;
}

.debug-log .log-error {
    color: #dc3545;
}

.debug-log .log-success {
    color: #28a745;
}

.debug-log .log-info {
    color: #17a2b8;
}