:root {
    --primary-color: #4a6ee0;
    --secondary-color: #1e293b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

body {
    background: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

h1 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

h1 i {
    color: var(--primary-color);
    font-size: 34px;
}

.qr-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.qr-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.qr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(74, 110, 224, 0.12);
    border-color: rgba(74, 110, 224, 0.4);
}

.qr-card.active {
    border-color: var(--primary-color);
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(74, 110, 224, 0.15);
}

.qr-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.qr-icon i {
    font-size: 22px;
    color: white;
}

.qr-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.qr-card p {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

.qr-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}

.badge-static {
    background: #d1fae5;
    color: #065f46;
}

.badge-dynamic {
    background: #fee2e2;
    color: #991b1b;
}

.generator-panel {
    background: white;
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.panel-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title i {
    color: var(--primary-color);
    margin-right: 8px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 6px;
    display: block;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 110, 224, 0.15);
}

.btn-generate {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border: none;
    padding: 11px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 110, 224, 0.3);
}

.qr-result {
    text-align: center;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px dashed #cbd5e1;
    display: none;
}

.qr-result.show {
    display: block;
}

.qr-image {
    max-width: 280px;
    margin: 0 auto 18px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.qr-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

.btn-download, .btn-copy {
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download {
    background: var(--success-color);
    color: white;
}

.btn-copy {
    background: var(--info-color);
    color: white;
}

.btn-download:hover, .btn-copy:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: #1e3a8a;
}

.info-box i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* History Table & Pagination */
.history-table {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}

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

.history-table th {
    background: #f8fafc;
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--secondary-color);
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.history-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    vertical-align: middle;
}

.history-table tr:hover {
    background: #f8fafc;
}

.qr-data-cell {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
    font-size: 12.5px;
    color: #334155;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.history-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding: 5px 2px;
}

.history-info {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-item .page-link {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    display: inline-block;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    color: #cbd5e1;
    pointer-events: none;
    background: #f8fafc;
}

.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
