/* ===== Global styles (unchanged) ===== */
html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    background-color: cornflowerblue;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 24px;
    margin: 24px;
    background-color: antiquewhite;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(0,0,0,0.12);
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
}

button[type="submit"] {
    background-color: darkgreen;
    color: aquamarine;
    border: none;
    border-radius: 5px;
    padding: 10px 14px;
    margin-top: 6px;
    cursor: pointer;
    align-self: flex-start;
}

button[type="submit"]:hover {
    background-color: darkcyan;
}

h1 {
    font-size: 36px;
    font-weight: bold;
    color: black;
    text-align: center;
    letter-spacing: 2px;
}

th {
    padding: 8px;
}

td {
    padding: 8px;
}

.existing-flights {
    position: fixed;
    bottom: 0;
    left: 375px;
}

/* ===== Dashboard‑specific styles (added) ===== */
/* Override body centering for dashboard pages */
body.dashboard-page {
    display: block;
    padding: 20px;
    box-sizing: border-box;
}

/* Main dashboard container */
.wrap {
    max-width: 1000px;
    margin: 20px auto;
    padding: 16px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    font-family: system-ui, Arial, sans-serif;
}

/* Header with user name and navigation */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 36px;
    font-weight: bold;
    color: black;
    letter-spacing: 2px;
    margin: 0;
}

.dashboard-header nav a {
    margin-left: 15px;
    color: darkgreen;
    text-decoration: none;
    font-weight: 600;
}

.dashboard-header nav a:hover {
    text-decoration: underline;
}

/* Grid of three cards */
.grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    width: 280px;
    flex: 1 1 280px;
}

.card h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #222;
}

.card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.9rem;
}

.card th,
.card td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

/* Feature area below the grid */
.feature-area {
    margin-top: 30px;
    border-top: 2px solid #eee;
    padding-top: 20px;
}

.feature-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.feature-card h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: #222;
}

/* Forms inside feature card – use existing input styles, but constrain width */
.feature-card form {
    max-width: 500px;
}

.feature-card form label {
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: auto;           /* override global button align-self */
    line-height: 1.2;
    padding: 8px 16px;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    background: #007bff;
    color: white;
    margin: 0;                 /* override any default button margins */
}

/* Override the global button[type="submit"] rule for .btn buttons */
button.btn {
    align-self: auto;          /* let parent's align-items take over */
}

.btn:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Tables in feature area (e.g., delete list) */
.feature-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.feature-card th,
.feature-card td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.feature-card th {
    background-color: #f2f2f2;
    font-weight: 600;
}

/* Memo table adjustments */
.feature-card table td form {
    display: inline-block;
    margin: 0 4px;
}

.feature-card table td button {
    margin: 0;
}

.feature-card table th:first-child,
.feature-card table td:first-child {
    width: 40px;
    text-align: center;
}
