/*
Theme Name: RiverMeadow Executive
Theme URI: https://execdash.rivermeadow.com
Description: RiverMeadow branded theme for the Executive Dashboard portal
Version: 1.0
Author: RiverMeadow Software Inc.
*/

/* ── Brand Variables ─────────────────────────────────────────────────────── */
:root {
    --rm-blue:        #1E6FEA;
    --rm-blue-dark:   #155DBF;
    --rm-blue-light:  #EEF4FD;
    --rm-navy:        #1C2B3A;
    --rm-navy-hover:  #243547;
    --rm-sidebar-w:   240px;
    --rm-white:       #ffffff;
    --rm-gray-100:    #F8FAFC;
    --rm-gray-200:    #E2E8F0;
    --rm-gray-500:    #64748B;
    --rm-gray-900:    #0F172A;
    --rm-text:        #1e293b;
    --rm-radius:      8px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
    color: var(--rm-text);
    background: var(--rm-white);
    line-height: 1.6;
}
a { color: var(--rm-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ══════════════════════════════════════════════════════════════════════════
   PUBLIC LAYOUT (landing page)
══════════════════════════════════════════════════════════════════════════ */
.rm-public body { background: var(--rm-white); }

/* Top Nav */
.rm-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    border-bottom: 1px solid var(--rm-gray-200);
    position: sticky;
    top: 0;
    background: var(--rm-white);
    z-index: 100;
}
.rm-nav-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--rm-gray-900);
    text-decoration: none;
}
.rm-nav-logo svg { width: 32px; height: 32px; }
.rm-nav-actions { display: flex; align-items: center; gap: 1rem; }
.rm-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.25rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s;
    text-decoration: none;
}
.rm-btn:hover { text-decoration: none; transform: translateY(-1px); }
.rm-btn-primary { background: var(--rm-blue); color: #fff; }
.rm-btn-primary:hover { background: var(--rm-blue-dark); color: #fff; }
.rm-btn-outline { background: transparent; color: var(--rm-blue); border: 1.5px solid var(--rm-blue); }
.rm-btn-outline:hover { background: var(--rm-blue-light); }

/* Hero */
.rm-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}
.rm-hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--rm-gray-900);
    margin-bottom: 1.25rem;
}
.rm-hero-text h1 .accent { color: var(--rm-blue); }
.rm-hero-text p {
    font-size: 1.1rem;
    color: var(--rm-gray-500);
    margin-bottom: 2rem;
    max-width: 480px;
}
.rm-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}
.rm-hero-image img { max-width: 100%; border-radius: 12px; }

/* Feature strip */
.rm-features {
    background: var(--rm-gray-100);
    padding: 3rem;
    text-align: center;
    border-top: 1px solid var(--rm-gray-200);
}
.rm-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 2rem auto 0;
}
.rm-feature-card {
    background: var(--rm-white);
    border-radius: var(--rm-radius);
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.rm-feature-card h3 { font-size: 1rem; color: var(--rm-gray-900); margin-bottom: .4rem; }
.rm-feature-card p { font-size: .875rem; color: var(--rm-gray-500); }

/* Footer */
.rm-footer {
    text-align: center;
    padding: 2rem;
    font-size: .8rem;
    color: var(--rm-gray-500);
    border-top: 1px solid var(--rm-gray-200);
}

/* ══════════════════════════════════════════════════════════════════════════
   PORTAL LAYOUT (logged-in dashboard)
══════════════════════════════════════════════════════════════════════════ */
.rm-portal {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sidebar */
.rm-sidebar {
    width: var(--rm-sidebar-w);
    background: var(--rm-navy);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
    transition: width .2s;
}
.rm-sidebar-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
}
.rm-sidebar-logo span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rm-white);
    letter-spacing: -.01em;
}
.rm-sidebar-logo svg { width: 28px; height: 28px; flex-shrink: 0; }

/* Nav menu */
.rm-sidebar-nav { padding: .75rem 0; flex: 1; }
.rm-sidebar-nav ul { list-style: none; }
.rm-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: rgba(255,255,255,.7);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .12s, color .12s;
    border-left: 3px solid transparent;
}
.rm-sidebar-nav li a:hover {
    background: var(--rm-navy-hover);
    color: var(--rm-white);
    text-decoration: none;
}
.rm-sidebar-nav li.active a,
.rm-sidebar-nav li.current-menu-item a {
    background: rgba(30,111,234,.2);
    color: var(--rm-white);
    border-left-color: var(--rm-blue);
}
.rm-sidebar-nav li a svg { width: 16px; height: 16px; opacity: .8; flex-shrink: 0; }

/* Sidebar footer */
.rm-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .75rem;
    color: rgba(255,255,255,.4);
}

/* Main content */
.rm-main {
    margin-left: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #F1F5F9;
}

/* Top bar */
.rm-topbar {
    background: var(--rm-white);
    border-bottom: 1px solid var(--rm-gray-200);
    padding: .875rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.rm-topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rm-gray-900);
}
.rm-topbar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: var(--rm-gray-500);
}
.rm-topbar-user a { color: var(--rm-gray-500); font-size: .8rem; }
.rm-topbar-user a:hover { color: var(--rm-blue); }
.rm-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--rm-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
}

/* Content area */
.rm-content {
    flex: 1;
    padding: 1.5rem 2rem;
}

/* Dashboard iframe embed */
.rm-dashboard-frame {
    width: 100%;
    border: none;
    border-radius: var(--rm-radius);
    min-height: calc(100vh - 120px);
    background: transparent;
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.rm-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F1F5F9 0%, #EEF4FD 100%);
}
.rm-login-box {
    background: var(--rm-white);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
}
.rm-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin-bottom: 1.75rem;
}
.rm-login-logo span { font-size: 1.2rem; font-weight: 700; color: var(--rm-gray-900); }
.rm-login-box h2 {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: .4rem;
    color: var(--rm-gray-900);
}
.rm-login-box .subtitle {
    text-align: center;
    color: var(--rm-gray-500);
    font-size: .875rem;
    margin-bottom: 1.75rem;
}

/* WordPress login form overrides */
#loginform { margin: 0; }
#loginform label { font-size: .875rem; color: var(--rm-gray-500); font-weight: 500; }
#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    padding: .65rem .875rem;
    border: 1.5px solid var(--rm-gray-200);
    border-radius: 6px;
    font-size: .9rem;
    margin-top: .3rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color .15s;
}
#loginform input:focus { border-color: var(--rm-blue); }
#loginform .forgetmenot { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--rm-gray-500); }
#wp-submit {
    width: 100%;
    background: var(--rm-blue);
    color: #fff;
    border: none;
    padding: .75rem;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background .15s;
}
#wp-submit:hover { background: var(--rm-blue-dark); }
#nav, #backtoblog { text-align: center; margin-top: .75rem; }
#nav a, #backtoblog a { font-size: .8rem; color: var(--rm-gray-500); }
#nav a:hover, #backtoblog a:hover { color: var(--rm-blue); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rm-hero { grid-template-columns: 1fr; text-align: center; padding: 3rem 1.5rem; }
    .rm-hero-text p { max-width: 100%; }
    .rm-hero-image { display: none; }
    .rm-hero-text h1 { font-size: 2.2rem; }
    .rm-features-grid { grid-template-columns: 1fr; }
    .rm-nav { padding: 1rem 1.5rem; }
    .rm-sidebar { display: none; }
    .rm-main { margin-left: 0; }
}

/* ── Sidebar removed — force full-width layout ── */
.rm-portal { display: block !important; }
.rm-sidebar { display: none !important; }
.rm-main { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
.rm-content { margin-left: 0 !important; padding-left: 0 !important; }

/* Fix: rm-main must be block so child max-width containers center correctly */
.rm-main { display: block !important; }
