/* =========================
   Global / Layout
   ========================= */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

/* Wrapper holds page content under fixed header/nav and above fixed footer */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content spacing:
   - top padding to clear fixed navbar
   - bottom padding to clear fixed footer
*/
.content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;

    width: 90%;
    max-width: 1100px;

    margin: 70px auto 0;        /* clears navbar */
    padding: 20px 20px 70px;     /* clears footer */
    border-radius: 10px;
}

/* Common containers */
.container {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.container-wide {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    margin: 0 auto;
}

.content img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

/* =========================
   Header / Navbar
   ========================= */

header {
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Navbar */
.navbar {
    width: 100%;
    background-color: #444;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}

.navbar ul li {
    margin: 0;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* Tooltip helper */
span[title] {
    cursor: help;
    color: #555;
    margin-left: 4px;
}

/* =========================
   Dropdowns (top nav)
   ========================= */

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #3a7e79;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    top: 100%;
    left: 0;
    border-radius: 6px;
    overflow: hidden;
}

.dropdown-content a {
    color: white;
    padding: 12px 14px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #385860;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Nested dropdown */
.nested-dropdown {
    position: relative;
}

.nested-dropdown-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 180px;
    background-color: #3a7e79;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1200;
    border-radius: 6px;
    overflow: hidden;
}

.nested-dropdown:hover .nested-dropdown-content {
    display: block;
}

/* =========================
   Footer (smaller)
   ========================= */

footer {
    width: 100%;
    text-align: center;
    background: #333;
    color: white;

    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;

    padding: 8px 0;       /* ↓ reduced height */
    margin: 0;
}

.footer-bottom {
    padding: 4px 0;       /* ↓ reduced inner padding */
    line-height: 1.2;
    font-size: 0.85rem;
}

/* =========================
   Buttons
   ========================= */

.btn {
    background-color: #3a7e79;
    display: inline-block;
    color: white;
    border: none;
    padding: 8px 12px;      /* ↑ slightly more usable than 4px 8px */
    font-size: 14px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    box-shadow: 1px 1px #004ea2;
    text-decoration: none;
}

.btn:hover {
    background-color: #385860;
}

.btn:active {
    box-shadow: 1px 1px #00408b;
    transform: translate(1px, 1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* If you still want a delete style (use sparingly) */
.btn-delete {
    background-color: #dc3545;
    box-shadow: 1px 1px #8f1f2b;
}

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

/* =========================
   Forms
   ========================= */

.form-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
    gap: 10px;
}

.form-group label {
    width: 40%;
    text-align: right;
    font-size: 14px;
    font-weight: bold;
    padding-right: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 55%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

/* =========================
   Messages
   ========================= */

.message-box {
    max-width: 600px;
    margin: 20px auto;
    padding: 14px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
}

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

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

/* =========================
   Tables
   ========================= */

.table-responsive {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    border: 1px solid #ddd;
    padding: 10px;
    background: white;
    border-radius: 10px;
}

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

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    white-space: nowrap;
}

th {
    background-color: #f4f4f4;
    font-weight: bold;
}

/* Buttons inside tables */
table a.btn {
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

table button.btn {
    width: auto; /* avoid stretching full width unless you want it */
}
