* {
    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;
}

.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.logo {
    padding: 30px 20px;
    background: #16213e;
    border-bottom: 2px solid #0f3460;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.menu ul {
    list-style: none;
}

.menu-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.menu-item:hover {
    background: #16213e;
    border-left-color: #667eea;
}

.menu-item.active {
    background: #16213e;
    border-left-color: #667eea;
}

.menu-item .icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.menu-item .label {
    font-size: 1rem;
    font-weight: 500;
}

/* Main Content Styles */
.content {
    flex: 1;
    overflow-y: auto;
    background: #f5f7fa;
}

.tool-container {
    display: none;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.tool-header p {
    font-size: 1.1rem;
    color: #666;
}

/* QR Code Generator Styles */
.tool-body {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.input-section {
    margin-bottom: 40px;
}

.input-section label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.url-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

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

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
}

.message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.output-section {
    text-align: center;
}

.qr-code-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    background: #fafafa;
    margin-bottom: 20px;
}

.qr-code-container .placeholder {
    color: #999;
    font-size: 1.1rem;
}

.qr-code-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
    }

    .tool-container {
        padding: 20px;
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* Analytics Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    line-height: 1;
}

.stat-content h3 {
    font-size: 2.5rem;
    color: #667eea;
    margin: 0;
    font-weight: 700;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
}

.chart-content {
    min-height: 200px;
}

.chart-bar {
    margin-bottom: 15px;
}

.bar-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 30px;
    border-radius: 5px;
    transition: width 0.3s ease;
    min-width: 5%;
}

.bar-value {
    font-weight: 600;
    color: #667eea;
    min-width: 40px;
}

.activity-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.activity-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #f9f9f9;
}

.activity-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.activity-meta {
    font-size: 0.85rem;
    color: #999;
}