/* Client Portal Styles */

/* Portal Body */
.portal-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Page Styles */
.portal-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.portal-login-card,
.portal-status-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-login-header,
.portal-status-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.portal-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(10px);
}

.portal-logo i {
    font-size: 2.5rem;
    color: white;
}

.portal-login-header h1,
.portal-status-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portal-login-header p,
.portal-status-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

.portal-login-body,
.portal-status-body {
    padding: 2rem;
}

.portal-login-footer,
.portal-status-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.portal-login-form .form-control {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.portal-login-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.portal-login-form .form-label {
    font-weight: 600;
    color: #495057;
}

/* Portal Dashboard Styles */
.portal-container {
    min-height: 100vh;
    background: #f4f7fa;
}

.portal-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-brand {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.portal-brand:hover {
    color: white;
}

.portal-user-info {
    color: white;
}

.portal-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portal-welcome h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Stat Cards */
.portal-stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portal-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* Portal Cards */
.portal-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.portal-card-header {
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.portal-card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1a1a2e;
}

.portal-card-body {
    padding: 1.5rem;
}

/* Ticket List */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.ticket-item:hover {
    background: #f1f3f5;
    transform: translateX(4px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ticket-token code {
    font-size: 0.75rem;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.ticket-subject {
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.ticket-date {
    font-size: 0.8rem;
}

/* Ticket Status Page */
.ticket-result {
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.ticket-result-header {
    margin-bottom: 1.5rem;
}

.ticket-token-large code {
    font-size: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 2px dashed #dee2e6;
}

.ticket-status-badge {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.ticket-status-badge.status-open {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.ticket-status-badge.status-in_progress {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.ticket-status-badge.status-closed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.ticket-details {
    text-align: left;
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6c757d;
    font-size: 0.875rem;
}

.detail-value {
    font-weight: 500;
    color: #1a1a2e;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .portal-content {
        padding: 1rem;
    }

    .portal-navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .portal-welcome h1 {
        font-size: 1.5rem;
    }

    .portal-stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon i {
        font-size: 1.25rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .stat-content p {
        font-size: 0.75rem;
    }

    .portal-login-container {
        padding: 1rem;
    }

    .portal-login-card,
    .portal-status-card {
        border-radius: 1rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .detail-value {
        text-align: left;
    }
}

/* Service Cards for Portal */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.service-card.overdue {
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.service-card.due-soon {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f3f5;
}

.service-header h6 {
    font-weight: 600;
    color: #1a1a2e;
}

.service-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: none;
}

.service-details .detail-row span:first-child {
    color: #6c757d;
    font-size: 0.875rem;
}

.service-details .detail-row span:last-child {
    font-weight: 500;
}

.next-payment-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.next-payment-alert.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.next-payment-alert.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.next-payment-alert.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

@media (max-width: 768px) {
    .service-details {
        grid-template-columns: 1fr;
    }
}

.next-payment-alert.alert-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.next-payment-alert.alert-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}