/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header and Navigation */
header {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
}

nav {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    background-color: #3498db;
    color: white;
}

nav button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: auto;
}

nav button:hover {
    background-color: #c0392b;
}

/* Login page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    min-width: 400px;
}

.login-form h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-form h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-weight: normal;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Statistics grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.stat-card span {
    color: #2c3e50;
    font-size: 36px;
    font-weight: bold;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.actions button {
    background-color: #27ae60;
}

.actions button:hover {
    background-color: #219a52;
}

/* Form containers */
.form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-container h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Status indicators */
.status-active {
    color: #27ae60;
    font-weight: 600;
}

.status-inactive {
    color: #e74c3c;
    font-weight: 600;
}

.status-used {
    color: #3498db;
    font-weight: 600;
}

/* Action buttons in tables */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit {
    background-color: #f39c12;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
}

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

/* Settings page */
.settings-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.code-block {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: "Courier New", monospace;
    overflow-x: auto;
}

/* Messages and alerts */
.message {
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.import-options {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.import-option {
    padding: 20px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.import-option:hover {
    border-color: #3498db;
}

.import-option h4 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 16px;
}

.import-option input[type="file"] {
    margin-bottom: 15px;
    padding: 10px;
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.import-option input[type="file"]:hover {
    border-color: #3498db;
}

.import-option textarea {
    width: 100%;
    min-height: 120px;
    margin-bottom: 15px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
}

.import-option textarea:focus {
    outline: none;
    border-color: #3498db;
}

.file-info {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

.modal-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.modal-actions button {
    background-color: #95a5a6;
    margin: 0 10px;
}

.modal-actions button:hover {
    background-color: #7f8c8d;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    nav {
        flex-direction: column;
        align-items: stretch;
    }

    nav a,
    nav button {
        text-align: center;
        margin: 2px 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .login-form {
        min-width: auto;
        margin: 20px;
        padding: 30px 20px;
    }

    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 10px 8px;
    }
}
