/* Variables for easy color changing later */
:root {
    --primary-color: #2563eb; /* A nice professional blue */
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc; /* Soft off-white background */
    --text-color: #334155;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Navigation Bar */
.navbar {
    background-color: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.navbar h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    margin-left: 1.5rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Main Content Container */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* White Cards for Forms and Data */
.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

h1, h2, h3 {
    margin-top: 0;
    color: #0f172a;
}

/* Forms and Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

/* Updated Input Styling */
input[type="text"], 
input[type="number"], 
select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box; /* Keeps padding inside the width */
    font-size: 1rem;
}

/* New CSS Grid for Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; /* Space between the boxes */
    margin-bottom: 20px;
}

/* Clean, readable labels */
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
    font-size: 0.9rem;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: var(--primary-hover);
}

/* Data Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #475569;
}

tr:hover {
    background-color: #f8fafc;
}

/* QR Code Modal Styles */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: white; padding: 2rem; border-radius: 8px; text-align: center; max-width: 400px; width: 100%; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.modal-content img { max-width: 100%; height: auto; margin: 1rem 0; border: 1px solid var(--border); padding: 10px; }
.modal-title { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.5rem; color: #0f172a; }
.modal-url { font-size: 0.8rem; color: #64748b; margin-bottom: 1rem; word-break: break-all; }
.btn-print { background-color: #3b82f6; color: white; border: none; padding: 0.6rem 1.2rem; border-radius: 4px; cursor: pointer; font-weight: bold; margin-right: 10px; }
.btn-close { background-color: #e2e8f0; color: #475569; border: none; padding: 0.6rem 1.2rem; border-radius: 4px; cursor: pointer; font-weight: bold; }
.qr-btn { background-color: #8b5cf6; padding: 0.4rem 0.8rem; font-size: 0.85rem; text-decoration: none; border-radius: 4px; color: white; font-weight: bold; border: none; cursor: pointer; margin-left: 5px; }
.qr-btn:hover { background-color: #7c3aed; }