/* ===== Titan's Fitness - "Deep Sea" Dark Theme =====
   Palette:  Ink Black #0D1321   Deep Space Blue #1D2D44   Blue Slate #3E5C76
             Dusty Denim #748CAB   Eggshell #F0EBD8
   Two soft tints are added for borders and small text:
             Border blue #2b405c   Muted text #a3b3c9
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    background-color: #0D1321;
    color: #F0EBD8;
    color-scheme: dark;
    /* makes date pickers and scrollbars dark too */
}

/* Serif headings give a classy look */
h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: #F0EBD8;
}

h1 {
    display: inline-block;
    border-bottom: 2px solid #748CAB;
    padding-bottom: 8px;
}

.section-header {
    margin: 30px 0 0;
    border-left: 4px solid #748CAB;
    padding-left: 12px;
}

/* ===== Header ===== */
header {
    background-color: #0D1321;
    color: #F0EBD8;
    padding: 18px 25px;
    border-bottom: 3px solid #748CAB;
}

header h2 {
    margin: 0;
}

/* ===== Sidebar ===== */
.sidebar {
    background-color: #0D1321;
    width: 230px;
    min-height: 100vh;
    padding: 20px;
    float: left;
    border-right: 1px solid #2b405c;
}

.sidebar h2 {
    color: #F0EBD8;
    font-size: 20px;
    letter-spacing: 2px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2b405c;
}

.sidebar a {
    display: block;
    color: #a3b3c9;
    text-decoration: none;
    padding: 13px 10px;
    margin: 5px 0;
    border-left: 4px solid transparent;
    border-radius: 5px;
    transition: 0.3s;
}

.sidebar a:hover {
    background-color: #1D2D44;
    color: #F0EBD8;
    border-left: 4px solid #748CAB;
}

/* Current page link. "a[style]" also catches links that have an inline style in the HTML,
   and !important lets this rule win over that inline style. */
.sidebar a.active,
.sidebar a[style] {
    background-color: #748CAB !important;
    color: #0D1321 !important;
    font-weight: bold;
    border-left: 4px solid #F0EBD8;
}

.sidebar a.logout:hover {
    border-left: 4px solid #d9776f;
}

/* ===== Main content ===== */
.content {
    padding: 30px;
    overflow: hidden;
}

.card-container,
.panel-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 20px 0;
}

/* Corner design: light blue corner on the top-left, slate shadow on the bottom-right */
.card,
.panel,
.login-box {
    background-color: #1D2D44;
    border: 1px solid #2b405c;
    border-top: 3px solid #748CAB;
    border-left: 3px solid #748CAB;
    border-radius: 0 12px 12px 12px;
    box-shadow: 4px 4px 0 #3E5C76;
    padding: 20px;
}

.card {
    flex: 1 1 180px;
    transition: 0.3s;
}

.card:hover {
    box-shadow: 7px 7px 0 #748CAB;
}

.card h3 {
    font-size: 16px;
    margin: 0;
    color: #a3b3c9;
}

.number {
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: bold;
    color: #F0EBD8;
    margin: 6px 0 0;
}

.panel {
    flex: 1 1 300px;
}

.panel h3 {
    margin-top: 0;
    font-size: 17px;
}

.profile-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #2b405c;
}

.profile-line span:first-child {
    color: #a3b3c9;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1D2D44;
    margin-top: 20px;
    border-top: 3px solid #748CAB;
}

th,
td {
    padding: 12px;
    border: 1px solid #2b405c;
    text-align: left;
}

th {
    background-color: #3E5C76;
    color: #F0EBD8;
    border-color: #4d6d8a;
}

tr:hover td {
    background-color: #25384f;
}

/* ===== Status badges ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.badge-active {
    background-color: #1f3d36;
    color: #8fd1b2;
}

.badge-pending {
    background-color: #3d3520;
    color: #e6c77a;
}

.badge-expired {
    background-color: #3d2328;
    color: #e39a9f;
}

/* ===== Forms and buttons ===== */
input,
select,
textarea {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 8px 0 16px;
    border: 1px solid #3E5C76;
    border-radius: 6px;
    background-color: #0D1321;
    color: #F0EBD8;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #748CAB;
    outline: 2px solid #3E5C76;
}

label {
    font-weight: bold;
    font-size: 14px;
    color: #a3b3c9;
}

.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.form-grid>div {
    flex: 1 1 260px;
}

.hint {
    color: #a3b3c9;
    font-size: 14px;
}

button {
    background-color: #748CAB;
    color: #0D1321;
    padding: 11px 22px;
    border: none;
    border-radius: 0 8px 8px 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background-color: #F0EBD8;
}

button.secondary {
    background-color: #1D2D44;
    color: #F0EBD8;
    border: 1px solid #748CAB;
}

button.secondary:hover {
    background-color: #3E5C76;
}

button.danger {
    background-color: #a8434d;
    color: #F0EBD8;
    padding: 6px 12px;
}

button.danger:hover {
    background-color: #c2545f;
}

/* ===== Login page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 30px;
}

.login-box h1 {
    font-size: 26px;
}

/* ===== Progress bars ===== */
.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
}

.progress-track {
    width: 100%;
    height: 16px;
    background-color: #0D1321;
    border: 1px solid #2b405c;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background-color: #748CAB;
    border-radius: 10px;
}

.workout {
    width: 80%;
}

.attendance {
    width: 85%;
}

.fitness {
    width: 70%;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 20px;
    color: #748CAB;
}

/* ===== Mobile screens ===== */
@media (max-width: 600px) {
    .sidebar {
        float: none;
        width: 100%;
        min-height: auto;
        border-right: none;
    }

    .content {
        padding: 15px;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 7px;
    }
}