/* General Reset & Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f111a;
    color: #e1e1e6;
    min-height: 100vh;
}

/* Helper Class for Tailwind Bridge */
.hidden {
    display: none !important;
}

.hover\:bg-cardHover:hover {
    background-color: #1a1d2d;
}

/* Brand Logo Styling */
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 10px;
    border: 2px solid #ef4444;
}

.hero-logo-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #161824;
    border-bottom: 1px solid #23273a;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
}

.btn-login {
    background-color: #ef4444;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-login:hover {
    background-color: #dc2626;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #161824;
    border-bottom: 1px solid #23273a;
}

.topbar-brand {
    display: flex;
    align-items: center;
}

.topbar-brand h1 {
    font-size: 1.3rem;
    color: #ffffff;
}

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

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ef4444;
}

.username {
    font-weight: 600;
}

/* Hero Section */
.hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    text-align: center;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background-color: #1c2033;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #9ba1b8;
    margin-bottom: 1.5rem;
    border: 1px solid #2d334d;
}

.hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero-content p {
    font-size: 1.1rem;
    color: #a0a5ba;
    margin-bottom: 2rem;
}

.btn-cta {
    display: inline-block;
    background-color: #ef4444;
    color: #ffffff;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.btn-cta:hover {
    background-color: #dc2626;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 240px;
    background-color: #131520;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid #23273a;
}

.nav-btn {
    background: transparent;
    color: #9ba1b8;
    border: none;
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #1c2033;
    color: #ffffff;
}

.nav-btn.active {
    background-color: #ef4444;
    color: #ffffff;
}

.logout-btn {
    margin-top: auto;
    color: #ed4245;
}

.logout-btn:hover {
    background-color: rgba(237, 66, 69, 0.1);
    color: #ed4245;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-danger {
    background-color: #ed4245;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #c03537;
}

/* Overview & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #161824;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid #23273a;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #9ba1b8;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    margin-top: 0.5rem;
}

.section-block {
    margin-bottom: 2rem;
}

.section-block h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.flex-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flex-item {
    display: flex;
    justify-content: space-between;
    background-color: #161824;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    border-left: 4px solid #ef4444;
}

.flex-item.archived {
    border-left-color: #747f8d;
    opacity: 0.6;
}

/* Routines & Diet */
.routine-card {
    background-color: #161824;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #23273a;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.day-box {
    background-color: #1c2033;
    padding: 1rem;
    border-radius: 6px;
}

.day-box strong {
    color: #ef4444;
    display: block;
    margin-bottom: 0.5rem;
}

.day-box ul {
    list-style: none;
    font-size: 0.85rem;
    color: #c9cddb;
}

.day-box li {
    margin-bottom: 0.3rem;
}

.diet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.diet-card {
    background-color: #161824;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid #23273a;
}

.diet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.diet-header h4 {
    font-size: 1rem;
    color: #ffffff;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

.tag.veg { background-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.tag.non-veg { background-color: rgba(239, 68, 68, 0.2); color: #f87171; }
.tag.supplement { background-color: rgba(251, 191, 36, 0.2); color: #fcd34d; }

.diet-info p {
    font-size: 0.9rem;
    color: #9ba1b8;
    margin-top: 0.3rem;
}

.placeholder-text {
    color: #747f8d;
    font-style: italic;
}