
/* Company QR Generator Styles */
:root {
    --primary-color: #4facfe;
    --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --secondary-color: #667eea;
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--secondary-gradient);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Navigation */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.nav-brand a {
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: var(--dark-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-gradient);
    color: white;
}

.nav-item.logout {
    background: var(--danger-color);
    color: white;
}

.nav-item.logout:hover {
    background: #c82333;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 20px auto;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Headers */
.header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Content */
.content {
    padding: 40px;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.file-input {
    border: 2px dashed var(--primary-color) !important;
    background: #f8f9ff;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.file-input:hover {
    background: #e6f0ff;
    border-color: #2196f3 !important;
}

/* Buttons */
.btn {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e9ecef;
}

.mini-btn {
    padding: 8px 16px;
    font-size: 14px;
    margin: 5px;
}

.download-btn {
    background: var(--success-color);
    padding: 12px 24px;
    margin: 10px;
}

.download-btn:hover {
    background: #218838;
}

.view-btn {
    background: var(--info-color);
    padding: 12px 24px;
    margin: 10px;
}

.view-btn:hover {
    background: #138496;
}

/* Messages */
.error {
    background: #ffe6e6;
    color: var(--danger-color);
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
    margin: 20px 0;
}

.success {
    background: #e6ffe6;
    color: var(--success-color);
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
    margin: 20px 0;
}

/* Results */
.result {
    margin-top: 30px;
    padding: 25px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    text-align: center;
}

.result img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.result-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.dashboard-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3em;
    opacity: 0.8;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.dashboard-section {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.dashboard-section h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.project-item:hover {
    background: #e9ecef;
}

.project-info {
    flex: 1;
}

.project-info h4 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.project-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.project-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.project-preview {
    width: 60px;
    height: 60px;
}

.mini-qr {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
}

.type-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.type-stat {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    gap: 15px;
    align-items: center;
}

.type-name {
    font-weight: 500;
    text-transform: capitalize;
}

.type-bar {
    background: var(--light-color);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.type-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.type-count {
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
}

.quick-actions {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.quick-actions h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: var(--light-color);
    padding: 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: var(--transition);
}

.action-card:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.action-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.action-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.action-desc {
    color: #666;
    font-size: 14px;
}

/* Projects Page */
.projects-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.projects-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.projects-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.search-section {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: end;
}

.search-input-group {
    display: flex;
    gap: 0;
}

.search-input {
    flex: 1;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
}

.search-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: #0056b3;
}

.filter-select {
    min-width: 150px;
}

.clear-filters {
    background: var(--danger-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.clear-filters:hover {
    background: #c82333;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 200px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-qr {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--border-radius);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.overlay-btn {
    background: white;
    color: var(--dark-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.overlay-btn:hover {
    background: var(--primary-color);
    color: white;
}

.overlay-btn.delete:hover {
    background: var(--danger-color);
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.project-data {
    margin-bottom: 15px;
    font-size: 14px;
}

.data-preview {
    background: var(--light-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.project-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.project-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 12px;
}

.type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.type-url { background: #e3f2fd; color: #1976d2; }
.type-text { background: #f3e5f5; color: #7b1fa2; }
.type-email { background: #e8f5e8; color: #388e3c; }
.type-phone { background: #fff3e0; color: #f57c00; }
.type-custom { background: #fafafa; color: #616161; }

.downloads {
    color: var(--success-color);
    font-weight: bold;
}

.size {
    color: #666;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    margin-top: 40px;
}

.page-btn {
    background: white;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.page-btn:hover {
    background: var(--primary-color);
    color: white;
}

.page-info {
    color: white;
    font-weight: bold;
}

/* 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: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
}

.close:hover {
    opacity: 1;
}

.modal form {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Batch Generation */
.batch-instructions {
    background: var(--light-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border-left: 4px solid var(--info-color);
}

.batch-instructions h3 {
    color: var(--info-color);
    margin-bottom: 10px;
}

.batch-instructions code {
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
}

.batch-instructions pre {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 10px;
    overflow-x: auto;
    font-size: 14px;
}

.batch-results {
    margin-top: 40px;
}

.batch-results h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.summary-card h4 {
    margin-bottom: 10px;
}

.summary-card .count {
    font-size: 2.5em;
    font-weight: bold;
}

.summary-card.success .count {
    color: var(--success-color);
}

.summary-card.error .count {
    color: var(--danger-color);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.result-card.success {
    border-left: 4px solid var(--success-color);
}

.result-card.error {
    border-left: 4px solid var(--danger-color);
}

.result-card h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.result-qr {
    max-width: 100px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
}

.batch-download {
    text-align: center;
    margin-top: 30px;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .content {
        padding: 20px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-item {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .project-footer {
        flex-direction: column;
        gap: 5px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .content {
        padding: 15px;
    }
    
    .nav-container {
        padding: 0 10px;
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-menu {
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-header h1 {
        font-size: 2em;
    }
    
    .projects-header h1 {
        font-size: 2em;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2.5em;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .project-item {
        flex-direction: column;
        text-align: center;
    }
    
    .project-preview {
        align-self: center;
    }
}

/* Print Styles */
@media print {
    .top-nav,
    .footer,
    .nav-links,
    .search-section,
    .project-overlay,
    .modal,
    .btn,
    .overlay-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .container,
    .dashboard-container,
    .projects-container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    
    .header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #ccc;
    }
    
    .project-card {
        break-inside: avoid;
        margin-bottom: 20px;
        border: 1px solid #ccc;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #343a40;
        --border-color: #495057;
    }
    
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: var(--dark-color);
    }
    
    .container,
    .dashboard-section,
    .project-card,
    .search-section,
    .modal-content {
        background: #495057;
        color: var(--dark-color);
    }
    
    .project-item {
        background: #6c757d;
    }
    
    .project-item:hover {
        background: #5a6268;
    }
    
    .top-nav {
        background: rgba(73, 80, 87, 0.95);
    }
    
    .nav-item {
        color: var(--dark-color);
    }
    
    .nav-item:hover {
        background: #6c757d;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.hidden { display: none; }
.visible { display: block; }

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}