/* ===================================
   GlucoLog Base Styles
   Health-focused design with pale green theme
   =================================== */

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f4f8f9 0%, #f1fbfa 48%, #edf6f2 100%);
    color: #16324f;
    line-height: 1.7;
    font-size: 17px;
    min-height: 100vh;
}

/* ===================================
   Navigation
   =================================== */
.public-nav {
    background-color: #ffffff;
    padding: 1.25rem 2rem;
    border-bottom: 2px solid #c5e9e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar-nav {
    width: 240px;
    background-color: #ffffff;
    border-right: 2px solid #c5e9e6;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.page-layout {
    flex: 1;
    min-width: 0;
}

.top-profile {
    min-height: 70px;
    padding: 1rem 2rem;
    border-bottom: 2px solid #c5e9e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background-color: #ffffff;
}

.top-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #16324f;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    color: #16324f;
    text-decoration: none;
}

.profile-link:hover {
    background-color: #f1fbfa;
    color: #16324f;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c5e9e6;
}

.nav-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.public-nav a,
.sidebar-nav a {
    color: #00a896;
    text-decoration: none;
    font-size: 1.0625rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 3px;
}

.public-nav a:hover,
.sidebar-nav a:hover {
    color: #16324f;
    background-color: #f1fbfa;
}

.public-nav a:active,
.sidebar-nav a:active {
    background-color: #e6f6f4;
}

/* ===================================
   Main Content
   =================================== */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ===================================
   Welcome Section (Landing Page)
   =================================== */
.welcome-container {
    display: grid;
    gap: 1rem;
}

.landing-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.landing-copy,
.landing-panel,
.feature-card {
    background: #ffffff;
    border: 1px solid #c5e9e6;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(45, 95, 79, 0.08);
}

.landing-copy {
    padding: 2rem;
}

.landing-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0a9396;
    background: #e6fbf8;
    border: 1px solid #c8ede7;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.8rem;
}

.landing-copy h1 {
    color: #16324f;
    font-size: 2.35rem;
    line-height: 1.25;
    margin-bottom: 1rem;
    font-weight: 700;
}

.landing-copy p {
    color: #46627a;
    font-size: 1.06rem;
    margin-bottom: 1.2rem;
    line-height: 1.75;
}

.landing-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.landing-actions .btn-primary,
.landing-actions .btn-secondary {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.landing-panel {
    padding: 1.35rem;
}

.landing-panel h2 {
    margin: 0 0 0.8rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: #16324f;
}

.landing-metrics {
    display: grid;
    gap: 0.55rem;
}

.metric-item {
    background: #f6fbf8;
    border: 1px solid #d9f2ee;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    display: grid;
    gap: 0.1rem;
}

.metric-title {
    color: #46627a;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-item strong {
    color: #16324f;
    font-size: 0.9rem;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.1rem 1.15rem;
}

.feature-card h3 {
    margin: 0 0 0.45rem;
    color: #16324f;
    font-size: 1rem;
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    color: #46627a;
    font-size: 0.91rem;
    line-height: 1.6;
}

/* ===================================
   Buttons
   =================================== */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #19b4ae 0%, #00a896 55%, #178f9a 100%);
    color: #ffffff;
    padding: 0.875rem 2.25rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: 1px solid #028090;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #19a7a7 0%, #028090 100%);
    text-decoration: none;
    color: #ffffff;
}

.btn-primary:active {
    background-color: #05668d;
}

/* Secondary Button Style */
.btn-secondary {
    background-color: #ffffff;
    color: #46627a;
    border: 1px solid #b4ddd8;
}

.btn-secondary:hover {
    background-color: #f1fbfa;
    color: #16324f;
}

/* ===================================
   Footer Note
   =================================== */
.footer-note {
    margin-top: 0.2rem;
    padding: 1rem 1.2rem;
    background-color: #f7fcf9;
    border-radius: 12px;
    border: 1px dashed #cde3d7;
    color: #46627a;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

/* ===================================
   Forms (Global)
   =================================== */
input,
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #b4ddd8;
    border-radius: 3px;
    font-size: 1.0625rem;
    color: #16324f;
    background-color: #ffffff;
    font-family: inherit;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #8ecfc5;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #00a896;
    box-shadow: 0 0 0 2px rgba(95, 168, 132, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #9fd8cf;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #16324f;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

button,
.btn-submit {
    background-color: #00a896;
    color: #ffffff;
    padding: 0.75rem 1.75rem;
    border: 1px solid #028090;
    border-radius: 3px;
    font-size: 1.0625rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

button:hover,
.btn-submit:hover {
    background-color: #028090;
}

button:active,
.btn-submit:active {
    background-color: #05668d;
}

/* ===================================
   Messages/Alerts
   =================================== */
.messages {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    padding: 1rem 1.25rem;
    border-radius: 3px;
    font-size: 1.0625rem;
    border-left: 3px solid;
    animation: fadeOut 8s ease forwards;
    cursor: pointer;
}

.message:hover {
    opacity: 0.9;
}

@keyframes fadeOut {
    0%,
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

.message.success {
    border-color: #00a896;
    background: #e8f5e9;
    color: #2e7d32;
}

.message.error {
    border-color: #e57373;
    background: #ffebee;
    color: #c62828;
}

.message.warning {
    border-color: #ffb74d;
    background: #fff3e0;
    color: #e65100;
}

.message.info {
    border-color: #64b5f6;
    background: #e3f2fd;
    color: #1565c0;
}

/* ===================================
   Links
   =================================== */
a {
    color: #00a896;
    transition: color 0.2s ease;
}

a:hover {
    color: #028090;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .public-nav {
        padding: 1rem;
    }

    .public-nav a,
    .sidebar-nav a {
        font-size: 1rem;
        padding: 0.5rem;
    }

    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .welcome-container {
        gap: 0.9rem;
    }

    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-copy {
        padding: 1.4rem;
    }

    .landing-copy h1 {
        font-size: 1.7rem;
    }

    .landing-features {
        grid-template-columns: 1fr;
    }

    .landing-actions .btn-primary,
    .landing-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .app-layout {
        flex-direction: column;
    }

    .sidebar-nav {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #c5e9e6;
        padding: 1rem;
    }

    .nav-left {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .top-profile {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .public-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-left {
        width: 100%;
        justify-content: center;
    }

    .profile-link {
        font-size: 0.95rem;
    }

    .top-title {
        font-size: 1.15rem;
    }

    .profile-avatar {
        width: 32px;
        height: 32px;
    }
}
