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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1 {
    font-size: 1.75rem;
    color: #212529;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem 0;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
    display: block; /* Stack vertically on mobile */
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef; /* Subtle separator */
}

a:hover,
a:focus {
    color: #0056b3;
    text-decoration: underline;
}

/* Navigation */
nav {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

nav section {
    margin-bottom: 1.5rem; /* Space between sections */
}

nav section:last-child {
    margin-bottom: 0;
}

/* Header (for welcome message) */
header {
    margin-bottom: 1.5rem;
}

header p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Logout button */
.logout {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #dc3545;
    color: #fff !important;
    border-radius: 6px;
    text-align: center;
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.logout:hover,
.logout:focus {
    background: #c82333;
    text-decoration: none;
    color: #fff !important;
}

/* General utilities (extend for other pages) */
.container {
    max-width: 100%;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

button,
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

button:hover,
.btn:hover {
    background: #0056b3;
}

button:active,
.btn:active {
    transform: translateY(1px);
}

/* Table styles (for view pages) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Mobile-first: No media queries needed for base, but ensure touch targets are >=44px */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    body {
        padding: 2rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    nav {
        padding: 2rem;
    }

    /* Horizontal links on tablet */
    nav section a {
        display: inline-block;
        padding: 0.5rem 1rem;
        margin-right: 1rem;
        border: none;
        border-radius: 6px;
        background: #e9ecef;
        margin-bottom: 0.5rem;
    }

    nav section a:hover {
        background: #dee2e6;
    }

    .logout {
        float: right;
        margin-top: 0;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    body {
        padding: 3rem;
    }

    .container {
        max-width: 1200px;
    }

    nav section a {
        background: none;
        padding: 0.5rem;
        margin-right: 2rem;
        border-bottom: 1px solid transparent;
    }

    nav section a:hover {
        border-bottom-color: #007bff;
    }

    table {
        font-size: 0.95rem;
    }

    th,
    td {
        padding: 1rem;
    }
}

/* Basic table styling with thin borders and alternating row colors */
table {
    border-collapse: collapse; /* Merges borders for a cleaner, thinner look */
    width: 100%; /* Optional: Makes table full width */
    font-family: Arial, sans-serif; /* Optional: Clean font */
}

th, td {
    border: 1px solid #ddd; /* Thin, light gray border */
    padding: 8px 12px; /* Padding for readability */
    text-align: left; /* Left-align content */
}

th {
    background-color: #f8f9fa; /* Optional: Slightly different header background */
    font-weight: bold;
}

/* Alternating row colors: even rows get a light gray background */
tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Hover effect for better UX (optional) */
tr:hover {
    background-color: #e9ecef;
}

/* Footer styles */
footer {
    margin-top: auto;
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid #dee2e6;
}

@media (min-width: 768px) {
    footer {
        padding: 1.5rem;
    }
}
.inline-link {
    display: inline !important; /* Inline flow, no line breaks */
    padding: 0 !important; /* No extra space */
    border-bottom: none !important; /* Remove separator if unwanted */
    margin: 0 0.25rem 0 0; /* Optional: Small horizontal margin for natural spacing */
}