/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-1px);
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff5252, #e53935);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    color: white;
}

/* Main content */
.main-content {
    padding: 2rem 1rem;
    min-height: calc(100vh - 80px);
}

/* Dashboard */
.dashboard-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* Ticket form */
.ticket-form-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.ticket-form-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.group-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.group-info p {
    margin: 0;
    font-weight: 500;
}

.group-info small {
    color: #666;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

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

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    color: white;
}

/* Tickets section */
.tickets-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.tickets-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.tickets-section p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}


/* Tickets table */
.tickets-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tickets-container h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.tickets-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tickets-table th,
.tickets-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.tickets-table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
}

.tickets-table tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tickets-table .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    margin-right: 0.3rem;
    margin-bottom: 0.2rem;
}

/* QR Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #000;
}

.qr-code-display {
    text-align: center;
    margin: 1rem 0;
}

.qr-code-display img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* QR Code Container in Modal - Fixed Layout */
#qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
    padding: 0;
    background: transparent;
    border: none;
    position: relative;
    min-height: 300px;
    width: 100%;
}

#qr-code-container img {
    max-width: 100%;
    width: 300px;
    height: 300px;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Remove any pseudo-elements that might cause white bands */
#qr-code-container::before,
#qr-code-container::after {
    display: none !important;
    content: none !important;
}

/* Ensure no overlapping elements */
#qr-code-container * {
    position: static;
    z-index: auto;
}

.ticket-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.ticket-details p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.ticket-details strong {
    color: #333;
}

/* Verification */
.verification-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.verification-card h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.scanner-container {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

#qr-reader {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    position: relative;
}

#qr-reader video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* Scanner loading state */
.scanner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    margin: 1rem 0;
}

.scanner-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scanner error state */
.scanner-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

/* Verification result states */
.verification-result {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.verification-result.loading {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.verification-result.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(25, 135, 84, 0.1));
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.verification-result.error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(200, 35, 51, 0.1));
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.verification-result.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.scanner-buttons {
    margin: 1rem 0;
    text-align: center;
}

.verification-result {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.verification-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.verification-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.verification-result.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.fraud-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Auth pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px);
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-card h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.95), rgba(74, 85, 104, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Group badges */
.group-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tickets-section {
        order: -1;
    }
    
    .code-input-group {
        flex-direction: column;
    }
    
    .tickets-table {
        font-size: 0.875rem;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
        max-height: 85vh;
    }
    
    #qr-code-container {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    #qr-code-container img {
        max-width: 100%;
        height: auto;
    }
    
    .verification-card {
        padding: 1.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .nav-link {
        text-align: center;
        padding: 0.75rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .dashboard-container,
    .tickets-container,
    .verification-card,
    .auth-card {
        padding: 1rem;
    }
    
    .tickets-table {
        font-size: 0.8rem;
        min-width: 600px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .code-input-group .btn {
        width: auto;
        margin-bottom: 0;
    }
}

/* iPhone specific fixes */
@media (max-width: 430px) {
    html, body {
        height: 100%;
        overflow-x: hidden;
        width: 100vw;
        max-width: 100vw;
    }
    
    .main-content {
        padding: 0.5rem;
        min-height: calc(100vh - 60px);
    }
    
    .dashboard-container,
    .tickets-container,
    .verification-card,
    .auth-card {
        padding: 0.75rem;
        margin: 0.25rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-header p {
        font-size: 0.9rem;
    }
    
    .ticket-form-section h3,
    .tickets-section h3 {
        font-size: 1.1rem;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    .tickets-table {
        font-size: 0.75rem;
        min-width: 500px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
        padding: 1rem;
        max-height: 90vh;
    }
    
    #qr-code-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0.5rem 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
        min-height: 250px !important;
        width: 100% !important;
    }
    
    #qr-code-container img {
        width: 250px !important;
        height: 250px !important;
        max-width: 100% !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 2px solid #000 !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
    
    /* Ensure no white bands on mobile */
    #qr-code-container::before,
    #qr-code-container::after {
        content: none !important;
        display: none !important;
    }
    
    #qr-code-container * {
        position: static !important;
        z-index: auto !important;
    }
    
    .nav-container {
        padding: 0.5rem;
        min-height: 50px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link,
    .logout-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Tablet specific fixes */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .nav-menu {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 1rem;
    }
    
    .nav-link {
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr 250px;
    }
}

/* Large tablet and desktop */
@media (min-width: 1024px) {
    .nav-container {
        max-width: 1200px;
    }
    
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr 300px;
    }
}

/* Messaging Service Styles */
.bot-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Service Status Styles */
.service-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 8px;
    font-weight: 500;
}

.service-item.available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.service-item.unavailable {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.service-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.config-services h4,
.config-details h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.config-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Messaging Config Display */
#messaging-config-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

#messaging-config-info {
    margin-top: 1rem;
}

/* Enhanced Status Display */
.status-details ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.status-details li {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-success {
    color: #28a745 !important;
}

.text-muted {
    color: #6c757d !important;
}

.bot-header {
    text-align: center;
    margin-bottom: 2rem;
}

.bot-header h2 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.bot-header p {
    color: #718096;
    font-size: 1.1rem;
}

.bot-status-section,
.bot-actions-section {
    margin-bottom: 2rem;
}

.status-card,
.action-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.status-card h3,
.action-card h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.status-ready {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.status-not-ready {
    background: #fffaf0;
    color: #c05621;
    border: 1px solid #fbd38d;
}

.status-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.status-details {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.status-details p {
    margin-bottom: 0.5rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bot-instructions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.bot-instructions h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.instruction-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #718096;
    line-height: 1.6;
}

.scheduled-message-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f7fafc;
}

.message-info h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.message-info p {
    color: #718096;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: #718096;
}

.loading-spinner i {
    font-size: 1.2rem;
}

/* Bot Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
}

.modal-content .close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #718096;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-content .close:hover {
    color: #2d3748;
}

.modal-content h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-text {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Phone number validation styles */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* QR Code Display */
.qr-container {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px dashed #dee2e6;
}

.qr-container img {
    max-width: 300px;
    height: auto;
    border: 2px solid #000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.qr-instructions {
    margin-top: 1rem;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

.qr-instructions i {
    color: #25D366;
    margin-right: 0.5rem;
}

#qr-code-display {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

#qr-code-display h4 {
    color: #856404;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#qr-code-display h4 i {
    color: #25D366;
}

/* Bot responsive styles */
@media (max-width: 768px) {
    .bot-container {
        padding: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .instruction-step {
        flex-direction: column;
        text-align: center;
    }
    
    .scheduled-message-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .message-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* WhatsApp Status Indicator */
.whatsapp-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.status-indicator i {
    font-size: 1rem;
}

.status-indicator.success {
    color: #25D366;
}

.status-indicator.error {
    color: #e53e3e;
}

.status-indicator.warning {
    color: #ed8936;
}

/* Sent Status Checkbox Styles */
.sent-status {
    text-align: center;
}

.sent-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.sent-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkmark {
    display: none;
}


/* Tickets Summary Styles */
#tickets-summary {
    color: #667eea;
    font-weight: 500;
    font-size: 1rem;
    margin: 0.5rem 0;
}

/* Ticket Preview Styles */
.ticket-preview-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.ticket-preview-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.ticket-preview-container h2 {
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

.ticket-info {
    margin-bottom: 2rem;
}

.ticket-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticket-field label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-field span {
    font-size: 1.1rem;
    color: #333;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.status-verified {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.ticket-preview-image {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.ticket-preview-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
}

.loading-spinner p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

.ticket-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.ticket-actions .btn {
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ticket-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ticket-preview-section {
        padding: 1rem;
    }
    
    .ticket-preview-container {
        padding: 1.5rem;
    }
    
    .ticket-details {
        grid-template-columns: 1fr;
    }
    
    .ticket-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .ticket-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}