/* ============================================
   RCCI EOS Hub - Styles
   Riley Construction Company, Inc.
   ============================================ */

:root {
    --green: #006341;
    --green-dark: #004d33;
    --green-light: #e8f5f0;
    --black: #2C2A29;
    --gray: #888B8D;
    --gray-light: #BBBCBC;
    --gray-bg: #f4f5f6;
    --white: #ffffff;
    --red: #c0392b;
    --yellow: #f39c12;
    --blue: #2980b9;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }
body { background: var(--gray-bg); color: var(--black); font-size: 14px; }
.hidden { display: none !important; }

/* ============================================
   LOGIN
   ============================================ */
.login-screen {
    min-height: 100vh;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    background: var(--white);
    border-radius: 8px;
    padding: 48px 40px;
    width: 380px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.login-logo-bar { height: 6px; background: var(--green); border-radius: 3px; margin-bottom: 24px; }
.login-logo h1 { font-size: 26px; color: var(--green); font-weight: 700; margin-bottom: 6px; }
.login-logo p { color: var(--gray); font-size: 13px; margin-bottom: 32px; }
.login-btn {
    width: 100%; padding: 12px; background: var(--green); color: var(--white);
    border: none; border-radius: 4px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background 0.2s; margin-bottom: 24px;
}
.login-btn:hover { background: var(--green-dark); }
.login-tagline { color: var(--gray); font-size: 12px; }

/* ============================================
   APP SHELL
   ============================================ */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--green); height: 52px; display: flex; align-items: center;
    padding: 0 20px; gap: 20px; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-left { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.header-logo-bar { width: 4px; height: 28px; background: var(--white); border-radius: 2px; }
.header-title { color: var(--white); font-size: 16px; font-weight: 700; white-space: nowrap; }
.header-center { flex: 1; display: flex; justify-content: center; }
.nav { display: flex; gap: 4px; }
.nav-btn {
    background: transparent; color: rgba(255,255,255,0.8); border: none;
    padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 13px;
    font-weight: 500; transition: all 0.2s;
}
.nav-btn:hover { background: rgba(255,255,255,0.15); color: var(--white); }
.nav-btn.active { background: rgba(255,255,255,0.2); color: var(--white); font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 12px; min-width: 180px; justify-content: flex-end; }
.user-name { color: rgba(255,255,255,0.9); font-size: 13px; }
.logout-btn {
    background: rgba(255,255,255,0.15); color: var(--white);
    border: 1px solid rgba(255,255,255,0.3); padding: 4px 12px;
    border-radius: 4px; cursor: pointer; font-size: 12px; transition: all 0.2s;
}
.logout-btn:hover { background: rgba(255,255,255,0.25); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content { flex: 1; padding: 28px 32px; max-width: 1400px; width: 100%; margin: 0 auto; }
.section { display: none; }
.section.active { display: block; }
.section-header { margin-bottom: 24px; border-left: 4px solid var(--green); padding-left: 14px; }
.section-header h2 { font-size: 22px; color: var(--black); font-weight: 700; }
.section-sub { color: var(--gray); font-size: 13px; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 28px;
}
.eos-card {
    background: var(--white); border-radius: 8px; padding: 24px 16px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-top: 4px solid var(--green);
    transition: transform 0.2s;
}
.eos-card:hover { transform: translateY(-2px); }
.eos-card-icon { font-size: 28px; margin-bottom: 10px; }
.eos-card-label { font-weight: 700; font-size: 14px; color: var(--black); margin-bottom: 8px; }
.eos-card-status { font-size: 11px; padding: 3px 10px; border-radius: 12px; display: inline-block; font-weight: 600; }
.not-started { background: #f0f0f0; color: var(--gray); }
.in-progress { background: #fff3cd; color: #856404; }
.complete { background: #d4edda; color: #155724; }
.dashboard-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.summary-card { background: var(--white); border-radius: 8px; padding: 24px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.summary-number { font-size: 42px; font-weight: 700; color: var(--green); line-height: 1; margin-bottom: 8px; }
.summary-label { color: var(--gray); font-size: 13px; font-weight: 500; }
.placeholder-msg { background: var(--white); border-radius: 8px; padding: 48px; text-align: center; color: var(--gray); font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.loading { text-align: center; padding: 48px; color: var(--gray); font-size: 15px; }

/* ============================================
   SHARED STATUS BADGES
   ============================================ */
.rock-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.status-green { background: #d4edda; color: #155724; }
.status-yellow { background: #fff3cd; color: #856404; }
.status-red { background: #f8d7da; color: #721c24; }
.status-complete { background: #cce5ff; color: #004085; }
.status-gray { background: #f0f0f0; color: var(--gray); }

/* ============================================
   ROCKS
   ============================================ */
.quarter-group { margin-bottom: 32px; }
.quarter-label { font-size: 16px; font-weight: 700; color: var(--green); margin-bottom: 14px; padding-bottom: 6px; border-bottom: 2px solid var(--green-light); }
.rocks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.rock-card {
    background: var(--white); border-radius: 8px; padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-left: 4px solid var(--green);
    display: flex; flex-direction: column; gap: 10px;
}
.rock-card-header { display: flex; justify-content: space-between; align-items: center; }
.rock-dept { font-size: 11px; font-weight: 700; background: var(--green-light); color: var(--green); padding: 2px 8px; border-radius: 10px; }
.rock-title { font-size: 15px; font-weight: 700; color: var(--black); }
.rock-owner { font-size: 12px; color: var(--gray); }
.rock-progress { display: flex; align-items: center; gap: 10px; }
.progress-bar { flex: 1; height: 8px; background: var(--gray-bg); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width 0.3s ease; }
.progress-pct { font-size: 12px; font-weight: 700; color: var(--green); min-width: 32px; }
.rock-due { font-size: 12px; color: var(--gray); }
.rock-component { font-size: 11px; color: var(--white); background: var(--green); padding: 2px 8px; border-radius: 10px; display: inline-block; width: fit-content; }

/* ============================================
   ISSUES
   ============================================ */
.issues-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.issues-count-card { background: var(--white); border-radius: 8px; padding: 20px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.issues-count-card.red { border-top: 4px solid #c0392b; }
.issues-count-card.yellow { border-top: 4px solid #f39c12; }
.issues-count-card.green { border-top: 4px solid var(--green); }
.issues-count { font-size: 36px; font-weight: 700; color: var(--black); }
.issues-count-label { font-size: 13px; color: var(--gray); font-weight: 500; }
.issues-list { display: flex; flex-direction: column; gap: 8px; }
.issue-row {
    background: var(--white); border-radius: 8px; padding: 14px 18px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); gap: 16px;
}
.issue-row-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.issue-row-right { flex-shrink: 0; }
.issue-priority { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.priority-high { background: #f8d7da; color: #721c24; }
.priority-med { background: #fff3cd; color: #856404; }
.priority-low { background: #f0f0f0; color: var(--gray); }
.issue-title { font-size: 14px; font-weight: 600; color: var(--black); }
.issue-meta { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* ============================================
   SCORECARD
   ============================================ */
.scorecard-table-wrap { background: var(--white); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.scorecard-table { width: 100%; border-collapse: collapse; }
.scorecard-table thead tr { background: var(--green); color: var(--white); }
.scorecard-table th { padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; }
.scorecard-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background 0.15s; }
.scorecard-table tbody tr:hover { background: var(--green-light); }
.scorecard-table td { padding: 12px 16px; font-size: 13px; }
.metric-name { font-weight: 600; color: var(--black); }

/* ============================================
   PROCESSES
   ============================================ */
.process-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.process-card {
    background: var(--white); border-radius: 8px; padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-left: 4px solid var(--gray-light);
    display: flex; flex-direction: column; gap: 10px;
}
.process-desc { font-size: 12px; color: var(--gray); line-height: 1.5; }
.process-link { font-size: 12px; color: var(--green); text-decoration: none; font-weight: 600; }
.process-link:hover { text-decoration: underline; }

/* ============================================
   MEETINGS
   ============================================ */
.meetings-list { display: flex; flex-direction: column; gap: 16px; }
.meeting-card { background: var(--white); border-radius: 8px; padding: 20px 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-left: 4px solid var(--green); }
.meeting-header { display: flex; align-items: center; gap: 24px; margin-bottom: 12px; }
.meeting-date { font-size: 16px; font-weight: 700; color: var(--black); }
.meeting-type-badge { font-size: 11px; font-weight: 700; background: var(--green-light); color: var(--green); padding: 2px 10px; border-radius: 10px; margin-top: 4px; display: inline-block; }
.meeting-stats { display: flex; gap: 24px; margin-left: auto; }
.meeting-stat { text-align: center; }
.meeting-stat-num { display: block; font-size: 24px; font-weight: 700; color: var(--green); }
.meeting-stat-label { font-size: 11px; color: var(--gray); }
.meeting-attendees { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.meeting-notes { font-size: 13px; color: var(--black); line-height: 1.6; background: var(--gray-bg); border-radius: 4px; padding: 10px 14px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--black); color: var(--gray-light); padding: 12px 32px;
    display: flex; justify-content: space-between; align-items: center; font-size: 12px;
}
.footer strong { color: var(--white); }

/* ============================================
   SECTION HEADER ROW (with New button)
   ============================================ */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.section-header-row .section-header {
    margin-bottom: 0;
}
.new-btn {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.new-btn:hover { background: var(--green-dark); }

/* ============================================
   SLIDE-OUT PANEL
   ============================================ */
.panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
}
.panel-overlay.open { display: block; }

.slide-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    height: 100vh;
    background: var(--white);
    z-index: 300;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
}
.slide-panel.open { right: 0; }

.panel-header {
    background: var(--green);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.panel-header h3 { color: var(--white); font-size: 17px; font-weight: 700; }
.panel-close {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.panel-close:hover { opacity: 1; }

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.panel-save-btn {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.panel-save-btn:hover { background: var(--green-dark); }
.panel-save-btn:disabled { background: var(--gray-light); cursor: not-allowed; }
.panel-cancel-btn {
    background: transparent;
    color: var(--gray);
    border: 1px solid var(--gray-light);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.panel-cancel-btn:hover { background: var(--gray-bg); }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--black); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-size: 14px;
    color: var(--black);
    background: var(--white);
    transition: border-color 0.2s;
    width: 100%;
}
.form-input:focus { outline: none; border-color: var(--green); }
.form-textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel-error { background: #f8d7da; color: #721c24; padding: 10px 14px; border-radius: 4px; font-size: 13px; }
