/* ------------------------------------------------------------
   GENERAL LAYOUT & TYPOGRAPHY
------------------------------------------------------------ */

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    background-color: #f5f5f5;
    color: #333;
}

h1, h2, h3 {
    font-weight: 600;
    color: #333;
}

p {
    line-height: 1.5;
}

.container {
    max-width: 960px;
    margin: 25px auto;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ------------------------------------------------------------
   HEADER & MENU
------------------------------------------------------------ */

header {
    background-color: #2d2d2d;
    padding: 12px 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 18px;
    font-size: 14px;
}

nav a:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   FORMS
------------------------------------------------------------ */

form {
    margin-top: 10px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

input[type="file"] {
    font-size: 14px;
}

button,
input[type="submit"] {
    display: inline-block;
    background-color: #2d2d2d;
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

button:hover,
input[type="submit"]:hover {
    background-color: #444;
}

/* Radio buttons aligned nicely */
input[type="radio"] {
    margin-right: 6px;
}

/* ------------------------------------------------------------
   FLASH MESSAGES
------------------------------------------------------------ */

.flash {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

.flash.info {
    background-color: #e8f4fd;
    color: #0b4f71;
}

.flash.success {
    background-color: #e6f4ea;
    color: #155724;
}

.flash.warning {
    background-color: #fff3cd;
    color: #856404;
}

.flash.danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* ------------------------------------------------------------
   TABLES
------------------------------------------------------------ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

table th {
    background-color: #fafafa;
    font-weight: 600;
}

/* ------------------------------------------------------------
   PRE (RAW JSON DISPLAY)
------------------------------------------------------------ */

pre {
    background-color: #f0f0f0;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
    margin-top: 15px;
    border: 1px solid #ddd;
}

/* ------------------------------------------------------------
   SPINNER / LOADING OVERLAY
------------------------------------------------------------ */

#loading-overlay {
    position: fixed;
    display: none;           /* shown dynamically */
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 8px solid #f1f1f1;
    border-top: 8px solid #555;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

/* ------------------------------------------------------------
   LINKS
------------------------------------------------------------ */

a {
    color: #0077cc;
}

a:hover {
    text-decoration: underline;
}
