/* Employee In/Out Board v1.2.0 - Frontend Styles */
/* Willie Howe Technology, LLC — https://williehowe.com */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

.eiob-board-wrap {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 980px;
    margin: 0 auto;
    color: #1a202c;
}

/* ===== HEADER BRANDING ===== */
.eiob-board-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}
.eiob-company-logo {
    max-height: 52px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
    display: block;
}
.eiob-default-icon {
    font-size: 1.9rem;
    line-height: 1;
}
.eiob-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ===== HELP BUTTON ===== */
.eiob-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 2px solid #6366f1;
    background: #fff;
    color: #6366f1;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.03em;
    transition: all 0.18s;
    white-space: nowrap;
}
.eiob-help-btn:hover,
.eiob-help-btn[aria-expanded="true"] {
    background: #6366f1;
    color: #fff;
}
.eiob-help-question {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #6366f1;
    color: #fff;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.18s;
}
.eiob-help-btn:hover .eiob-help-question,
.eiob-help-btn[aria-expanded="true"] .eiob-help-question {
    background: rgba(255,255,255,0.3);
}

/* ===== HELP PANEL ===== */
.eiob-help-panel {
    margin-bottom: 22px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(99,102,241,0.13), 0 1px 4px rgba(0,0,0,0.07);
    border: 1.5px solid #e0e7ff;
    background: #fff;
    animation: eiobHelpIn 0.22s ease;
}
@keyframes eiobHelpIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.eiob-help-inner {
    padding: 0;
}
.eiob-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
}
.eiob-help-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}
.eiob-help-close {
    background: rgba(255,255,255,0.18);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
    font-family: inherit;
    font-weight: 700;
}
.eiob-help-close:hover { background: rgba(255,255,255,0.35); }

/* Role badge */
.eiob-help-role-badge {
    display: inline-block;
    margin: 16px 22px 4px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.eiob-help-role-admin   { background: #fef9c3; color: #713f12; }
.eiob-help-role-manager { background: #ede9fe; color: #5b21b6; }
.eiob-help-role-user    { background: #f0f9ff; color: #0369a1; }

/* Sections */
.eiob-help-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: #e0e7ff;
    margin: 14px 0 0;
}
.eiob-help-section {
    background: #fff;
    padding: 16px 20px;
}
.eiob-help-section h4 {
    font-size: 0.88rem;
    font-weight: 800;
    margin: 0 0 7px;
    color: #4f46e5;
    letter-spacing: -0.01em;
}
.eiob-help-section p,
.eiob-help-section li {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 5px;
}
.eiob-help-section ul {
    margin: 6px 0 0;
    padding-left: 18px;
}
.eiob-help-section li { margin-bottom: 4px; }
.eiob-help-note {
    background: #f8faff;
}
.eiob-help-note p {
    color: #6366f1;
    font-weight: 600;
    font-style: italic;
}

.eiob-help-footer {
    padding: 10px 22px;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    text-align: right;
}
.eiob-help-footer a { color: #6366f1; text-decoration: none; }
.eiob-help-footer a:hover { text-decoration: underline; }

/* Responsive help grid */
@media (max-width: 600px) {
    .eiob-help-sections { grid-template-columns: 1fr; }
    .eiob-board-header  { flex-direction: column; align-items: flex-start; }
    .eiob-header-right  { flex-wrap: wrap; }
}

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.eiob-board-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0;
    color: #1a202c;
    letter-spacing: -0.02em;
}
.eiob-icon { margin-right: 6px; }
.eiob-legend { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; flex-wrap: wrap; }

/* Stats */
.eiob-board-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.eiob-stat {
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    border: 1px solid #e2e8f0;
    transition: transform 0.15s;
}
.eiob-stat:hover { transform: translateY(-2px); }
.eiob-stat-num { display: block; font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.eiob-stat-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; margin-top: 4px; font-weight: 600; }
.eiob-stat-in   .eiob-stat-num { color: #16a34a; }
.eiob-stat-away .eiob-stat-num { color: #ca8a04; }
.eiob-stat-out  .eiob-stat-num { color: #dc2626; }
.eiob-stat-total .eiob-stat-num { color: #6366f1; }

/* Badges */
.eiob-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.eiob-in   { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.eiob-away { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }
.eiob-out  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* Search + Filter */
.eiob-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.eiob-search-input {
    flex: 1;
    min-width: 180px;
    padding: 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.eiob-search-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.eiob-filter-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.eiob-filter-btn {
    padding: 7px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    transition: all 0.15s;
    font-family: inherit;
}
.eiob-filter-btn:hover, .eiob-filter-btn.active { background: #6366f1; color: #fff; border-color: #6366f1; }
.eiob-dept-filter { padding: 7px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 0.85rem; font-family: inherit; color: #4a5568; }

/* Dept header */
.eiob-dept-header {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 8px 8px 0 0;
    margin-top: 20px;
}

/* Table */
.eiob-table-wrap { overflow-x: auto; }
.eiob-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-bottom: 4px;
}
.eiob-table thead tr { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.eiob-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
}
.eiob-table td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.eiob-table tr:last-child td { border-bottom: none; }

.eiob-row-in   { background: #f0fdf4; }
.eiob-row-away { background: #fefce8; }
.eiob-row-out  { background: #fff; }
.eiob-row-mine { outline: 2px solid rgba(99,102,241,0.25); outline-offset: -2px; }

/* User cell */
.eiob-cell-user { display: flex !important; align-items: center; gap: 10px; }
.eiob-avatar { border-radius: 50% !important; width: 38px !important; height: 38px !important; flex-shrink: 0; }
.eiob-user-info { display: flex; flex-direction: column; }
.eiob-display-name { font-weight: 700; font-size: 0.92rem; }
.eiob-you-badge {
    display: inline-block;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
    width: fit-content;
}

/* Note / return cells */
.eiob-cell-note { font-size: 0.82rem; }
.eiob-note-text { display: block; color: #475569; }
.eiob-return-text { display: block; color: #0369a1; margin-top: 2px; }

/* Action area — three-button group */
.eiob-status-btns { display: flex; gap: 4px; }
.eiob-status-btn {
    padding: 5px 10px;
    border-radius: 7px;
    border: 1.5px solid transparent;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.15s;
    font-family: inherit;
    opacity: 0.55;
}
.eiob-status-btn:hover { opacity: 1; transform: translateY(-1px); }
.eiob-status-btn.active { opacity: 1; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.eiob-btn-in   { background: #dcfce7; color: #15803d; border-color: #86efac; }
.eiob-btn-away { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.eiob-btn-out  { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.eiob-btn-in.active   { background: #16a34a; color: #fff; border-color: #16a34a; }
.eiob-btn-away.active { background: #ca8a04; color: #fff; border-color: #ca8a04; }
.eiob-btn-out.active  { background: #dc2626; color: #fff; border-color: #dc2626; }

/* Note form inline */
.eiob-note-form { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.eiob-note-input, .eiob-return-input {
    padding: 5px 9px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
}
.eiob-note-input { width: 160px; }
.eiob-note-input:focus, .eiob-return-input:focus { border-color: #6366f1; }
.eiob-confirm-btn, .eiob-cancel-btn {
    padding: 5px 10px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
}
.eiob-confirm-btn { background: #6366f1; color: #fff; }
.eiob-confirm-btn:hover { background: #4f46e5; }
.eiob-cancel-btn { background: #f1f5f9; color: #64748b; }

.eiob-no-action, .eiob-login-note { color: #cbd5e0; }
.eiob-login-link { font-size: 0.85rem; color: #6366f1; text-decoration: underline; }

/* AJAX message */
.eiob-ajax-msg {
    margin-top: 14px;
    padding: 11px 16px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
}
.eiob-msg-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.eiob-msg-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* Refresh info */
.eiob-refresh-info { font-size: 0.75rem; color: #94a3b8; text-align: right; margin-top: 8px; }

.eiob-login-required { text-align: center; padding: 32px; color: #64748b; font-size: 0.95rem; }

.eiob-hidden { display: none !important; }

/* Widget styles */
.eiob-widget-list { margin: 0; padding: 0; list-style: none; }
.eiob-widget-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
}
.eiob-widget-item:last-child { border-bottom: none; }
.eiob-widget-avatar { border-radius: 50% !important; width: 28px !important; height: 28px !important; }
.eiob-widget-name { flex: 1; font-weight: 600; }
.eiob-widget-note { color: #94a3b8; font-size: 0.8rem; }
.eiob-widget-link { display: block; margin-top: 10px; font-size: 0.82rem; color: #6366f1; text-decoration: none; }
.eiob-widget-link:hover { text-decoration: underline; }

/* Compact mode */
.eiob-compact .eiob-table td,
.eiob-compact .eiob-table th { padding: 7px 10px; font-size: 0.82rem; }
.eiob-compact .eiob-avatar { width: 28px !important; height: 28px !important; }
.eiob-compact .eiob-board-stats { display: none; }

/* Responsive */
@media (max-width: 700px) {
    .eiob-board-stats { grid-template-columns: repeat(2,1fr); }
    .eiob-table th:nth-child(5), .eiob-table td:nth-child(5) { display: none; }
    .eiob-note-input { width: 110px; }
    .eiob-board-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 450px) {
    .eiob-board-stats { grid-template-columns: repeat(2,1fr); }
}
