* {
    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;
    color: #333;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo {
    margin-bottom: 30px;
}

.logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 300;
}

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

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.error {
    background: #ff6b6b;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Dashboard Styles */
.dashboard {
    min-height: 100vh;
    background: #f8f9fa;
}

.dashboard-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header .logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-header .logo-img {
    max-width: 60px;
    height: auto;
}

.dashboard-header h1 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 300;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

.dashboard-main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.upload-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.upload-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 300;
}

.upload-area {
    border: 3px dashed #bdc3c7;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area p {
    color: #7f8c8d;
    font-size: 16px;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
}

.files-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.files-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 300;
}

.files-list {
    display: grid;
    gap: 20px;
}

.file-item {
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.file-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.file-info h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 18px;
}

.file-info p {
    color: #7f8c8d;
    margin-bottom: 4px;
    font-size: 14px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.qr-code {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.download-url {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-url input {
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 5px;
    width: 300px;
    font-size: 12px;
    background: #f8f9fa;
}

.download-url button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.download-url button:hover {
    background: #2980b9;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .dashboard-main {
        padding: 20px;
    }
    
    .file-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .download-url {
        flex-direction: column;
        width: 100%;
    }
    
    .download-url input {
        width: 100%;
    }
}

/* Slot-based interface styles */
.slot-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.generate-slot-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.generate-slot-btn:hover {
    background: #218838;
}

.generate-slot-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.slot-result {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.slot-qr-code {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
    display: inline-block;
}

.slot-info {
    margin-top: 15px;
}

.slot-info p {
    margin: 8px 0;
    font-size: 14px;
}

.slot-info input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.slot-info button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
}

.slot-info button:hover {
    background: #0056b3;
}

.slots-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.slots-list {
    display: grid;
    gap: 20px;
}

.slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.slot-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.slot-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.slot-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slot-actions .qr-code {
    flex-shrink: 0;
}

.slot-actions .upload-url,
.slot-actions .download-url {
    display: flex;
    align-items: center;
    gap: 5px;
}

.slot-actions input {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.slot-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.current-slot-info {
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.current-slot-info p {
    margin: 0;
    font-weight: 500;
    color: #1976d2;
}

/* Status indicators */
.status-active {
    color: #28a745;
    font-weight: bold;
}

.status-used {
    color: #007bff;
    font-weight: bold;
}

.status-expired {
    color: #dc3545;
    font-weight: bold;
}

/* Responsive adjustments for slots */
@media (max-width: 768px) {
    .slot-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .slot-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .slot-actions .upload-url,
    .slot-actions .download-url {
        flex-direction: column;
        gap: 5px;
    }
    
    .slot-actions input {
        width: 100%;
    }
}