/* 
 * SoftSolutions - Sistema de Soporte
 * Estilos personalizados
 */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
}

/* General */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-brand {
    font-size: 1.25rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid;
    padding: 1.25rem;
}

.stat-card.primary {
    border-left-color: var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card.info {
    border-left-color: var(--info-color);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.3;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tickets */
.ticket-item {
    transition: background-color 0.2s ease;
}

.ticket-item:hover {
    background-color: #f8f9fc;
}

.ticket-number {
    font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Priority badges */
.badge-priority {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Status badges */
.badge-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Tables */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fc;
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-color);
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.35rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-initials {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Timeline (para historial de tickets) */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e3e6f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid #fff;
}

.timeline-item.response::before {
    background-color: var(--success-color);
}

.timeline-item.private::before {
    background-color: var(--warning-color);
}

.timeline-item.system::before {
    background-color: var(--secondary-color);
}

.timeline-item.solution::before {
    background-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(28, 200, 138, 0.2);
}

/* Chat-style messages */
.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #fff;
    border: 1px solid #e3e6f0;
}

.message.own {
    background-color: #e8f4fd;
    border-color: #d1e7fd;
}

.message.staff {
    background-color: #f0fdf4;
    border-color: #dcfce7;
}

.message.private {
    background-color: #fefce8;
    border-color: #fef3c7;
}

.message.solution-message {
    background-color: #d1fae5;
    border-color: #10b981;
    border-width: 2px;
    position: relative;
}

.message.solution-message::before {
    content: '✓ SOLUCIÓN';
    position: absolute;
    top: -10px;
    right: 10px;
    background: #10b981;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.message-author {
    font-weight: 600;
    color: var(--dark-color);
}

.message-time {
    color: var(--secondary-color);
}

.message-content {
    color: var(--dark-color);
    line-height: 1.6;
}

/* Login/Register pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 3rem rgba(0, 0, 0, 0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #e3e6f0;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dropdown notifications */
.notifications-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e3e6f0;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fc;
}

.notification-item.unread {
    background-color: #e8f4fd;
}

/* Sidebar (para admin) */
.sidebar {
    width: 250px;
    min-height: calc(100vh - 56px);
    background-color: #4e73df;
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* File attachments */
.attachment {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    margin: 0.25rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.2s ease;
}

.attachment:hover {
    background-color: #e3e6f0;
    color: var(--primary-color);
}

.attachment i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

/* Rating stars */
.rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.25rem;
}

.rating input {
    display: none;
}

.rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.2s ease;
}

.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label {
    color: #ffc107;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .navbar, .sidebar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
