* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
nav {
    background: #2c3e50;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: bold;
}

nav a:hover {
    color: #3498db;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main content */
.container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

th {
    background: #2c3e50;
    color: #fff;
    font-weight: 600;
}

tr:hover {
    background: #f9f9f9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    color: #fff;
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

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

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Forms */
form p {
    margin-bottom: 0.75rem;
}

form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}

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

/* Formset (order items) */
.formset-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.formset-row input,
.formset-row select {
    width: auto;
    flex: 1;
}

/* Messages */
.messages {
    list-style: none;
    margin-bottom: 1rem;
}

.messages li {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.messages .success {
    background: #d4edda;
    color: #155724;
}

.messages .error {
    background: #f8d7da;
    color: #721c24;
}

.messages .info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Auth forms */
.auth-container {
    max-width: 420px;
    margin: 3rem auto;
}

/* Utility */
.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 1rem;
}

/* Detail page */
.detail-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.5rem 1rem;
}

.detail-grid dt {
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.85rem;
}
