/* General layout */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #ffffff;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px 30px 15px;
    background: #ffffff;
    box-sizing: border-box;
}

.main-content {
    margin-top: 10px;
}

/* Header and navigation */

.main-header {
    background: #f4f4ea;
    color: #422D14;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #c7b48a;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

.main-header h1 {
    margin: 0;
    font-size: 22px;
    color: #422D14;
}

.main-nav {
    margin-top: 0;
}

.main-nav a {
    color: #422D14;
    margin-left: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.main-nav a:hover {
    text-decoration: underline;
}

/* Footer */

.main-footer {
    background: #422D14;
    color: #f4f4ea;
    padding: 8px 0;
    font-size: 12px;
    margin-top: 20px;
}

.main-footer .container {
    background: transparent;
}

/* Headings */

h2 {
    margin-top: 0;
    color: #422D14;
}

/* Grids for week and calendar */

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.calendar {
    margin-top: 15px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-weight: bold;
    margin-bottom: 8px;
    color: #4a3a23;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

/* Day tiles - used on Current Week and Monthly views */

.day-tile {
    background: #fffef8;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    border: 1px solid #d6c2a3;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.day-tile .day-header {
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2d3b8;
    font-weight: bold;
    color: #4a3a23;
}

.day-tile .role-line {
    margin: 1px 0;
}

.day-tile .role-line span {
    font-weight: 600;
    color: #3f3a32;
}

.day-tile .flag-line {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #5c4a26;
}

.day-tile.empty {
    color: #777777;
}

/* Colour coding for days */

.weekend {
    background: #f7e4c6;        /* soft sand tone */
}

.month-end {
    background: #dde8c7;        /* muted green */
}

.public-holiday {
    background: #b53a3a;        /* warm red */
    color: #ffffff;
}

.public-holiday .role-line span,
.public-holiday .day-header,
.public-holiday .flag-line {
    color: #ffffff;
}

.today {
    border: 2px solid #8c6b3b;
}

/* Legend */

.legend {
    margin-top: 10px;
}

.legend-item {
    display: inline-block;
    padding: 4px 8px;
    margin-right: 8px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.legend-item.weekend {
    background: #f7e4c6;
}

.legend-item.month-end {
    background: #dde8c7;
}

.legend-item.public-holiday {
    background: #b53a3a;
    color: #ffffff;
}

/* Forms and selects */

.month-select-form,
.user-select-form,
.admin-login-form,
.edit-date-form {
    margin-bottom: 10px;
}

.month-select-form select,
.user-select-form select,
.admin-login-form input[type="password"],
.edit-date-form input[type="date"] {
    padding: 4px 6px;
    font-size: 13px;
}

/* Tables */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin-top: 10px;
    font-size: 13px;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: left;
}

.data-table th {
    background: #f4f4ea;
    color: #422D14;
}

/* Alerts and admin sections */

.alert {
    padding: 6px 8px;
    background: #ffecb3;
    border: 1px solid #ffb300;
    margin-bottom: 10px;
}

.admin-section {
    background: #ffffff;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.admin-section h3 {
    margin-top: 0;
    color: #422D14;
}

.paste-area {
    width: 100%;
    box-sizing: border-box;
    font-family: Consolas, monospace;
    font-size: 12px;
}

/* Admin forms */

.form-row {
    margin-bottom: 8px;
}

.form-row label {
    display: inline-block;
    width: 100px;
    font-size: 13px;
}

.form-row select,
.form-row input[type="text"] {
    padding: 4px 6px;
    font-size: 13px;
    min-width: 180px;
}

.checkbox-row label {
    width: auto;
    margin-right: 10px;
}

/* Buttons and links */

button {
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #a98c5d;
    background: #e2c89a;
    color: #3f3424;
}

button:hover {
    background: #d6b780;
}

.logout-link {
    font-size: 12px;
    color: #8c4a2e;
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
}

.button-link {
    display: inline-block;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #a98c5d;
    background: #e2c89a;
    color: #3f3424;
    text-decoration: none;
    margin-right: 8px;
}

.button-link:hover {
    background: #d6b780;
}
