/* assets/style.css - Main Stylesheet */
:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --success: #00b09b;
    --danger: #ff416c;
    --warning: #ffb347;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Support Card */
.support-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-bottom: 30px;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.card-header p {
    color: var(--gray);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-submit i {
    margin-right: 8px;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-error i {
    margin-right: 10px;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
}

.info-box h3 {
    color: var(--dark);
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.info-box li i {
    color: var(--success);
    margin-right: 10px;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
}

.admin-link a {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s;
}

.admin-link a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Container */
.chat-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
}

.btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Ticket Info */
.ticket-info {
    margin-top: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.value {
    font-weight: 600;
    margin-top: 5px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-solved {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-rejected {
    background: #d6d8d9;
    color: #1b1e21;
}

/* Chat Box */
.chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
    clear: both;
}

.message-user {
    float: right;
}

.message-agent {
    float: left;
}

.message-content {
    padding: 12px 15px;
    border-radius: 15px;
    position: relative;
}

.message-user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-agent .message-content {
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

/* Chat Input */
.chat-input {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--light-gray);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 16px;
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-send:hover {
    background: var(--secondary);
}

.input-hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Admin Styles */
.admin-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.admin-header {
    background: linear-gradient(135deg, var(--dark), #34495e);
    color: white;
    padding: 20px;
}

.admin-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background: var(--danger);
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #e03558;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 600px;
}

.tickets-sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid var(--light-gray);
    overflow-y: auto;
}

.admin-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    background: var(--light);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-refresh {
    color: var(--primary);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-refresh:hover {
    background: rgba(106, 17, 203, 0.1);
}

.tickets-list {
    padding: 10px;
}

.ticket-item {
    display: block;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--dark);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.ticket-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.ticket-item.active {
    border-color: var(--primary);
    background: rgba(106, 17, 203, 0.05);
}

.ticket-uid {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
}

.ticket-category {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 5px 0;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.ticket-time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--gray);
}

.empty-chat i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Quick Responses */
.quick-responses {
    margin-top: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-responses span {
    font-size: 0.9rem;
    color: var(--gray);
}

.quick-response {
    padding: 5px 10px;
    background: var(--light-gray);
    border: none;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-response:hover {
    background: var(--primary);
    color: white;
}

/* Loading Animation */
.loading-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray);
}

.loading-chat i {
    margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .tickets-sidebar {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .chat-box {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .support-card {
        padding: 20px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}