/* ZonicDesk Public Styles */

/* Container Layout */
.zonicdesk-container {
    display: flex;
    min-height: 600px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.zonicdesk-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.zonicdesk-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.zonicdesk-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
}

.zonicdesk-nav {
    flex: 1;
    padding: 20px 0;
}

.zonicdesk-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zonicdesk-nav li {
    margin: 0;
}

.zonicdesk-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.zonicdesk-menu-item:hover {
    background: #f8f9fa;
    color: #495057;
    border-left-color: #dee2e6;
}

.zonicdesk-menu-item.active {
    background: #e3f2fd;
    color: #1976d2;
    border-left-color: #1976d2;
    font-weight: 500;
}

.zonicdesk-menu-item svg {
    margin-right: 12px;
    width: 16px;
    height: 16px;
}

/* Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
}

.status-open {
    background: #28a745;
}

.status-pending {
    background: #ffc107;
}

.status-closed {
    background: #dc3545;
}

/* User Section */
.user-section {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    align-items: center;
}

.user-section img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.greeting {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
}

/* Content Area */
.zonicdesk-content-area {
    flex: 1;
    padding: 30px;
    background: #ffffff;
    overflow-y: auto;
}

.zonicdesk-page-content {
    display: none;
}

.zonicdesk-page-content.active {
    display: block;
}

.zonicdesk-content-area h1 {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
    color: #212529;
}

/* Stats Grid */
.zonicdesk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Tickets List */
.zonicdesk-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.zonicdesk-ticket-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s ease;
}

.zonicdesk-ticket-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ticket-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    flex: 1;
}

.ticket-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ticket-id {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.ticket-user {
    font-size: 11px;
    color: #495057;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.ticket-status,
.ticket-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ticket-status.status-open {
    background: #d4edda;
    color: #155724;
}

.ticket-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.ticket-status.status-closed {
    background: #f8d7da;
    color: #721c24;
}

.ticket-priority.priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.ticket-priority.priority-normal {
    background: #d4edda;
    color: #155724;
}

.ticket-priority.priority-high {
    background: #fff3cd;
    color: #856404;
}

.ticket-priority.priority-critical {
    background: #f8d7da;
    color: #721c24;
}

.ticket-content p {
    margin: 0 0 12px 0;
    color: #495057;
    line-height: 1.5;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.ticket-category {
    font-weight: 500;
}

/* Ticket Form */
.zonicdesk-ticket-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.zonicdesk-ticket-form-container h2 {
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    text-align: center;
}

.zonicdesk-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

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

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.zonicdesk-submit-btn {
    background: #1976d2;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.zonicdesk-submit-btn:hover {
    background: #1565c0;
}

.zonicdesk-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* My Tickets */
.zonicdesk-my-tickets {
    max-width: 1000px;
    margin: 0 auto;
}

.zonicdesk-my-tickets h2 {
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

/* Empty State */
.zonicdesk-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.zonicdesk-empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Login Required */
.zonicdesk-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.zonicdesk-login-required h2 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.zonicdesk-login-required p {
    margin: 0 0 24px 0;
    color: #6c757d;
    font-size: 16px;
}

.zonicdesk-btn {
    display: inline-block;
    background: #1976d2;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.zonicdesk-btn:hover {
    background: #1565c0;
    color: #ffffff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .zonicdesk-container {
        flex-direction: column;
    }
    
    .zonicdesk-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .zonicdesk-content-area {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ticket-meta {
        flex-wrap: wrap;
    }
    
    .zonicdesk-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .zonicdesk-stats {
        grid-template-columns: 1fr;
    }
    
    .zonicdesk-ticket-form-container {
        padding: 20px;
    }
    
    .zonicdesk-content-area {
        padding: 15px;
    }
}
