﻿/* Global layout */
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    background: #f5f7fa;
    color: #333;
    /* Center everything for the login page */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Content wrapper */
.body-content {
    padding: 10px 15px;
}

/* Modern input defaults */
input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Error padding */
.padding-error {
    padding-top: 20px;
}

/* Mobile adjustments */
@media only screen and (max-width: 767px) {
    .nofloat {
        float: none;
        padding: 10px 15px;
    }
}

/* Typography helpers */
.bolded {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
}

.justbold {
    font-size: 1rem;
    font-weight: 600;
}

/* Disclaimer box */
.disclaimer {
    margin: 20px auto;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: #ffe4e8;
    border-left: 4px solid #d9534f;
    border-radius: 6px;
}

/* Centered card container (used on login page) */
.container {
    text-align: center;
    background: white;
    padding: 40px 50px;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    width: 350px;
}

.hero-image {
    width: 128px;
    height: 128px;
    object-fit: contain;
    margin: 0 auto 20px auto;
    display: block;
}


/* Welcome text */
.welcome-text {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

/* Error text */
.error-text {
    color: #d9534f;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

/* Code input */
.input-code {
    width: 80%;
    padding: 12px;
    font-size: 1.3rem;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
}

/* Number pad grid */
.number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

/* Number buttons */
.num-btn {
    font-size: 1.4rem;
    padding: 16px 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #4a90e2, #0072ff);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .num-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    }

/* Go button */
.go-btn {
    width: 100%;
    font-size: 1.5rem;
    padding: 16px 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #28a745, #1e8c39);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .go-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    }

/* Footer */
.footer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

    .footer a {
        color: #0072ff;
        text-decoration: none;
    }

/* Sleep Log Page */
.log-body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f7fa;
    padding: 40px 20px;
    text-align: center;
}

.log-container {
    background: white;
    padding: 30px;
    border-radius: 14px;
    max-width: 900px;
    margin: auto;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

    .log-container h2 {
        margin-top: 0;
        text-align: center;
        font-size: 1.8rem;
        color: #333;
    }

/* Grid container */
.grid-container {
    max-height: 600px;
    overflow-y: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* GridView styling */
.gridview table {
    width: 100%;
    border-collapse: collapse;
}

.gridview th {
    background: #0078D4;
    color: white;
    padding: 12px;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    z-index: 5;
    text-align: left;
}

.gridview td {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

.gridview tr:nth-child(even) {
    background: #fafafa;
}

.gridview tr:hover {
    background: #eef6ff;
}

/* Column widths */
.col-date {
    width: 200px;
}

.col-level {
    width: 300px;
}

/* Level bar */
.level-bar-bg {
    width: 100%;
    height: 16px;
    background: #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
}

.level-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Bigger keypad on mobile */
@media only screen and (max-width: 767px) {

    .container {
        width: 90%;
        padding: 30px 20px;
    }

    .input-code {
        font-size: 1.6rem;
        padding: 16px;
    }

    .number-pad {
        gap: 16px;
    }

    .num-btn {
        font-size: 2rem;
        padding: 22px 0;
        border-radius: 14px;
    }

    .go-btn {
        font-size: 2rem;
        padding: 22px 0;
        border-radius: 14px;
        margin-top: 10px;
    }
}
