/* =========================
   GLOBAL
========================= */

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

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
}

.container-members {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
}

.container-instructor {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
}

/* =========================
   LOGO
========================= */

.logo {
    width: 300px;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.company-badge {
    background: #f4f4f4;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 15px;
}

/* =========================
   LOGIN + REGISTER FORMS
========================= */

.auth-form {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* STACK INPUTS CLEANLY */
.form-row {
    margin-bottom: 15px;
}

/* ENSURE INPUTS ARE FULL WIDTH BUT CONTROLLED */
.form-row input {
    width: 100%;
}

/* CENTER BUTTONS */
.form-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* BUTTON SIZE NOT FULL WIDTH */
.form-buttons button {
    min-width: 160px;
}

/* =========================
   FORMS
========================= */

.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row label {
    width: 180px;
    min-width: 180px;
    font-weight: bold;
    text-align: left;
}

form {
    max-width: 500px;
    margin: 0 auto;
}

.form-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
}

input,
textarea,
select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* =========================
   BUTTONS
========================= */

.auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Make links look like buttons */
.auth-buttons a {
    display: inline-block;
    min-width: 180px;
    text-align: center;
}

.btn-primary,
.btn-cancel,
.btn-new,
.btn-edit,
.btn-view,
.btn-delete,
.btn-client,
.btn-settings,
.btn-parq,
.changepwd,
.btn-notifications,
.logout,
.btn-remove {
    display: inline-block;
    padding: 12px 18px;
    margin: 5px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-cancel,
.btn-remove,
.btn-delete {
    background: #dc3545;
}

.btn-cancel:hover,
.btn-remove:hover,
.btn-delete:hover {
    background: #b52a37;
}

.btn-new {
    background: #28a745;
}

.btn-new:hover {
    background: #218838;
}

.btn-edit {
    background: #ffc107;
    color: #000;
}

.btn-view {
    background: #fd7e14;
}

.btn-client {
    background: #272AF5;
}

.btn-parq {
    background: #FFBA00;
}
.btn-settings {
    background: #6f42c1;
}

.logout {
    background: #6c757d;
}

.changepwd {
    background: #cc06cc;
}

.btn-notifications {
    background: #a88537;
}

.logout:hover,
.btn-settings:hover,
.changepwd:hover,
.btn-notifications,
.btn-client:hover,
.btn-view:hover {
    opacity: 0.9;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* =========================
   TABLES
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background: #f0f0f0;
}

.container table th,
.container table td {
    white-space: nowrap;
}

/* =========================
   BOOKINGS
========================= */

.members-list {
    margin-top: 10px;
}

.member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.member-name {
    font-weight: 500;
}

/* =========================
   ALERTS
========================= */

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* =========================
   DASHBOARD STATS - Admin
========================= */

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

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.stat-card h2 {
    margin: 0;
    font-size: 24px;
}

.stat-card p {
    margin-top: 5px;
    color: #777;
}

/* =========================
   DASHBOARD STATS - Members
========================= */

.stats-grid-members {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.stat-card-members {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.stat-card-members h2 {
    margin: 0;
    font-size: 24px;
}

.stat-card-members p {
    margin-top: 5px;
    color: #777;
}


/* =========================
   DASHBOARD STATS - Instructor
========================= */

.stats-grid-instructor {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.stat-card-instructor {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.stat-card-instructor h2 {
    margin: 0;
    font-size: 24px;
}

.stat-card-instructor p {
    margin-top: 5px;
    color: #777;
}

/* =========================
   CLASS CAPACITY COLOURS
========================= */

.good-row {
    background: #e8f5e9;
}

.almost-full-row {
    background: #fff3e0;
}

.full-row {
    background: #ffebee;
}

table tr.good-row:hover,
table tr.almost-full-row:hover,
table tr.full-row:hover {
    filter: brightness(0.97);
}

/* =========================
   SETTINGS
========================= */

.settings-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
}

.settings-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.settings-section h2 {
    margin: 0 0 10px 0;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-section .form-buttons {
    margin-top: 10px;
}

.settings-actions a {
    display: inline-block;
    padding: 6px 12px;
    margin-left: 5px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.settings-actions .btn-edit,
.settings-actions .btn-delete {
    margin: 0;
    padding: 6px 10px;
}

.user-table {
    width: 100%;
    margin-top: 15px;
}

.user-row {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr 3fr 1.5fr;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    align-items: center;
}

.user-header {
    font-weight: bold;
    background: #f4f4f4;
    border-bottom: 2px solid #ccc;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin-right: 5px;
}

.badge.admin {
    background: #3b82f6;
    color: white;
}

.badge.member {
    background: #9ca3af;
    color: white;
}

.badge.instructor {
    background: #10b981;
    color: white;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .container {
        padding: 10px;
        }

    .auth-buttons a {
        width: 80%;
        }

    .logo {
        max-width: 180px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .top-links a {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row label {
        width: 100%;
        min-width: auto;
    }

    .form-buttons {
        flex-direction: column;
    }
}

/* =========================
   Notifications
========================= */

.notifications {
    margin-bottom: 20px;
}

.notification-card {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    text-align: left;
}

.notification-card strong {
    display: block;
    margin-bottom: 5px;
}

.notification-card small {
    color: #666;
}

/* =========================
   NOTIFICATION BOX
========================= */

.notification-box {
    background:#adbeafe;
    border:2px solid #4caf50;
    border-radius:10px;
    padding:15px;
    margin-bottom:20px;
}

.notification-item {
    padding:10px 0 !important;
    border-bottom:1px solid #ddd !important;
}

.notification-item:last-child {
    border-bottom:none !important;
}

.notification-expiry {
    display:block !important;
    margin-top:5px !important;
    color:#666 !important;
    font-size:12px !important;
}

/* =========================
   NEXT Class BOX
========================= */

.nextclass {
background:#e8f5e9;
border:2px solid #4caf50;
border-radius:10px;
padding:15px;
margin-bottom:20px;
}
/* ==================================================
   CALENDAR
================================================== */

.calendar-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
}

.calendar-month-title {
    font-size: 30px;
    font-weight: bold;
}

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

.calendar-heading {
    font-weight: bold;
    text-align: center;
    background: #fff;
    padding: 8px;
    border-radius: 6px;
}

.calendar-day {
    border: 1px solid #ddd;
    padding: 10px;
    min-height: 135px;
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.calendar-empty {
    background: #fff;
    border: 1px solid #eee;
}

.calendar-date {
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

/* Calendar entries only */

.calendar-class,
.calendar-teaching,
.calendar-member,
.calendar-closure,
.calendar-holiday {
    padding: 7px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
}

/* Normal / teaching class */
.calendar-class {
    background: #ffffff;
    border-left: 5px solid #ffffff;
}
.calendar-teaching {
    background: #eef3ff;
    border-left: 5px solid #3366cc;
}

/* Member booking */
.calendar-member {
    background: #eaffea;
    border-left: 5px solid #2e9d44;
}

/* Location closure */
.calendar-closure {
    background: #ffecec;
    border-left: 5px solid #cc3333;
}

/* Instructor holiday */
.calendar-holiday {
    background: #fff3d6;
    border-left: 5px solid #e6a100;
}

/* Key */

.calendar-key {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.key-item {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.key-teaching {
    background: #eef3ff;
}

.key-class {
    background: #ffffff;
}

.key-member {
    background: #eaffea;
}

.key-closure {
    background: #ffecec;
}

.key-holiday {
    background: #fff3d6;
}

/* Mobile */

@media (max-width: 900px) {

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-heading,
    .calendar-empty {
        display: none;
    }

    .calendar-day {
        min-height: auto;
    }

    .calendar-nav {
        flex-direction: column;
        gap: 10px;
    }

    .calendar-month-title {
        font-size: 24px;
    }

    .calendar-key {
        flex-direction: column;
        align-items: center;
    }
}

.tag-green,
.tag-orange {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
}

.tag-green {
    background: #eaffea;
    color: #2e7d32;
}

.tag-orange {
    background: #fff4e5;
    color: #b35c00;
}

.dashboard-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-header .logo {
    margin: 0;
}

.about-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    background: #1778c8;
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(23, 120, 200, 0.2);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.about-btn:hover {
    background: #0f5f9f;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(23, 120, 200, 0.28);
}

.about-btn:focus-visible {
    outline: 3px solid rgba(23, 120, 200, 0.3);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .dashboard-header {
        align-items: center;
    }

    .dashboard-header .logo {
        max-width: 180px;
        height: auto;
    }

    .about-btn {
        padding: 9px 14px;
        font-size: 14px;
    }
}

.help-menu{
    position:absolute;
    top:25px;
    right:25px;
    z-index:1000;
}

.help-button{

    background:#1778c8;
    color:#fff;

    border:none;
    border-radius:8px;

    padding:10px 18px;

    cursor:pointer;

    font-weight:600;

    transition:.2s;
}

.help-button:hover{
    background:#0f5f9f;
}

.help-dropdown{

    display:none;

    position:absolute;

    right:0;

    margin-top:8px;

    min-width:230px;

    background:#fff;

    border-radius:10px;

    box-shadow:0 8px 30px rgba(0,0,0,.15);

    overflow:hidden;
}

.help-dropdown a{

    display:block;

    padding:14px 18px;

    color:#333;

    text-decoration:none;

    border-bottom:1px solid #eee;
}

.help-dropdown a:last-child{
    border-bottom:none;
}

.help-dropdown a:hover{
    background:#f5f7fa;
}

.help-dropdown{
    display:none;

    position:absolute;
    right:0;
    margin-top:8px;
    min-width:240px;

    background:#fff;
    border-radius:10px;

    box-shadow:0 8px 30px rgba(0,0,0,.18);

    overflow:hidden;
}

.help-dropdown.show{
    display:block;
}