/* PCH Panel Frontend Styles - Client Portal */

/* Matching PCH Group dark theme */
.pch-portal {
    background-color: #0a0a0a;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 20px;
    min-height: 100vh;
}

.pch-portal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.pch-portal-header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 3px solid #00d4ff;
    margin-bottom: 40px;
}

.pch-portal-title {
    font-size: 3rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.pch-portal-subtitle {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 0;
}

/* Navigation Tabs */
.pch-portal-nav {
    margin-bottom: 30px;
}

.pch-nav-tabs {
    display: flex;
    gap: 3px;
    border-bottom: 1px solid #333;
    padding-bottom: 0;
    overflow-x: auto;
    align-items: flex-end;
}

.pch-nav-tab {
    padding: 8px 14px;
    color: #999;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 11px;
}

.pch-nav-tab:hover {
    color: #00d4ff;
    background-color: #111;
}

.pch-nav-tab.active {
    color: #000;
    background: #00d4ff;
    border-color: #00d4ff;
    border-bottom-color: transparent;
}

/* Content Area */
.pch-portal-content {
    min-height: 400px;
}

/* Dashboard Grid */
.pch-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.pch-dashboard-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pch-dashboard-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
}

.pch-dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.pch-card-title {
    color: #00d4ff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.pch-card-content {
    color: #fff;
}

/* Summary Stats */
.pch-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.pch-stat {
    text-align: center;
    padding: 20px;
    background-color: #333;
    border-radius: 8px;
    border: 1px solid #555;
    transition: all 0.3s ease;
}

.pch-stat:hover {
    border-color: #00d4ff;
    background-color: #3a3a3a;
}

.pch-stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 5px;
}

.pch-stat-label {
    color: #ccc;
    font-size: 14px;
}

/* Lists */
.pch-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pch-list-item {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pch-list-item:hover {
    border-color: #00d4ff;
    background-color: #3a3a3a;
}

.pch-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.pch-item-title {
    color: #00d4ff;
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

.pch-item-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 10px;
}

.pch-item-description {
    color: #fff;
    margin: 10px 0;
    line-height: 1.5;
}

/* Status Badges */
.pch-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pch-status-abierto {
    background-color: #ffc107;
    color: #000;
}

.pch-status-en_progreso {
    background-color: #17a2b8;
    color: #fff;
}

.pch-status-esperando {
    background-color: #fd7e14;
    color: #fff;
}

.pch-status-resuelto {
    background-color: #28a745;
    color: #fff;
}

.pch-status-cerrado {
    background-color: #6c757d;
    color: #fff;
}

.pch-status-borrador {
    background-color: #6c757d;
    color: #fff;
}

.pch-status-enviado {
    background-color: #17a2b8;
    color: #fff;
}

.pch-status-aceptado {
    background-color: #28a745;
    color: #fff;
}

.pch-status-rechazado {
    background-color: #dc3545;
    color: #fff;
}

.pch-status-vencido {
    background-color: #fd7e14;
    color: #fff;
}

.pch-status-pagada {
    background-color: #28a745;
    color: #fff;
}

.pch-status-vencida {
    background-color: #dc3545;
    color: #fff;
}

/* Forms */
.pch-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.pch-form-title {
    color: #00d4ff;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.pch-form-row {
    margin-bottom: 25px;
}

.pch-form-row label {
    display: block;
    color: #00d4ff;
    margin-bottom: 8px;
    font-weight: 600;
}

.pch-form-row input,
.pch-form-row select,
.pch-form-row textarea {
    width: 100%;
    padding: 15px;
    background-color: #0a0a0a;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.pch-form-row input:focus,
.pch-form-row select:focus,
.pch-form-row textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.pch-form-row textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.pch-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pch-btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #000;
}

.pch-btn-primary:hover {
    background: linear-gradient(135deg, #0099cc, #0077aa);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.pch-btn-secondary {
    background-color: #555;
    color: #fff;
    border: 2px solid #555;
}

.pch-btn-secondary:hover {
    background-color: transparent;
    border-color: #00d4ff;
    color: #00d4ff;
}

.pch-btn-block {
    width: 100%;
    text-align: center;
}

/* Ticket View */
.pch-ticket-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.pch-ticket-title {
    color: #00d4ff;
    font-size: 2rem;
    margin-bottom: 15px;
}

.pch-ticket-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pch-ticket-meta-item {
    color: #ccc;
}

.pch-ticket-meta-label {
    color: #00d4ff;
    font-weight: 600;
    margin-right: 10px;
}

/* Comments */
.pch-comments-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.pch-comments-title {
    color: #00d4ff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.pch-comment {
    background-color: #333;
    border-left: 4px solid #00d4ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.pch-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pch-comment-author {
    font-weight: 600;
    color: #00d4ff;
}

.pch-comment-date {
    font-size: 14px;
    color: #999;
}

.pch-comment-content {
    color: #fff;
    line-height: 1.6;
}

/* Add Comment Form */
.pch-add-comment-form {
    background-color: #333;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* No items message */
.pch-no-items {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Loading states */
.pch-loading {
    text-align: center;
    padding: 40px;
    color: #00d4ff;
}

.pch-loading:after {
    content: "";
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid #333;
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pch-portal {
        padding: 10px;
    }
    
    .pch-portal-title {
        font-size: 2rem;
    }
    
    .pch-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pch-dashboard-card {
        padding: 20px;
    }
    
    .pch-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pch-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pch-item-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .pch-ticket-meta {
        grid-template-columns: 1fr;
    }
    
    .pch-comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pch-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}/* Additional styles for improved client portal */

/* User menu styling */
.pch-user-menu {
    font-size: 14px;
}

.pch-user-link {
    color: #ccc;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.pch-user-link:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    text-decoration: none;
}

.pch-user-link.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
}

.pch-logout-link:hover {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Enhanced status badges with colors */
.pch-status-badge {
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Status colors as per spec */
.pch-status-abierto { background-color: #00d4ff; }
.pch-status-en_progreso { background-color: #ffc107; color: #333; }
.pch-status-esperando { background-color: #ff9800; color: #333; }
.pch-status-resuelto { background-color: #28a745; }
.pch-status-cerrado { background-color: #6c757d; }
.pch-status-urgente { background-color: #dc3545; }

/* Enhanced stat cards */
.pch-stat-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pch-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.1);
}

.pch-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 8px;
}

.pch-stat-label {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Delete button styling */
.pch-delete-btn {
    background: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.pch-delete-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* Enhanced list item hover effects */
.pch-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
}

/* Ticket detail improvements */
.pch-ticket-timeline {
    color: #ccc;
    font-size: 14px;
}

.pch-timeline-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid #00d4ff;
    border-radius: 4px;
}

.pch-priority-badge {
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Comments styling */
.pch-comments-list {
    max-height: 500px;
    overflow-y: auto;
}

.pch-comment-item {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.pch-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.pch-comment-date {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.pch-comment-content {
    color: #ccc;
    line-height: 1.6;
}

/* Form styling improvements */
.pch-form-group {
    margin-bottom: 20px;
}

.pch-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

.pch-form-control {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #555;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.pch-form-control:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.pch-form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #1a1a1a;
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pch-spinner {
    border: 4px solid #333;
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Empty states with icons */
.pch-no-items {
    text-align: center;
    padding: 40px 20px;
}

.pch-no-items div[style*="font-size: 48px"] {
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Enhanced button states */
.pch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.pch-btn-primary {
    background: #00d4ff;
    color: #000;
}

.pch-btn-secondary {
    background: #333;
    color: #fff;
}

.pch-btn-danger {
    background: #dc3545;
    color: #fff;
}

.pch-btn-primary:hover {
    background: #00b8e6;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.pch-btn-secondary:hover {
    background: #555;
}

.pch-btn-danger:hover {
    background: #c82333;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Profile page specific styling */
.pch-profile-container .pch-form-control {
    min-height: 44px;
}

.pch-profile-container textarea.pch-form-control {
    resize: vertical;
    min-height: 80px;
}

/* Improved responsive design */
@media (max-width: 768px) {
    .pch-user-menu {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .pch-stat-card {
        padding: 20px;
    }
    
    .pch-stat-number {
        font-size: 2rem;
    }
    
    .pch-ticket-timeline {
        font-size: 13px;
    }
    
    .pch-comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pch-comment-date {
        margin-left: 0;
    }
    
    .pch-delete-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}