/* ══════════════════════════════════════════════════
   Theme – EmployeeMetrics Admin
   Main:   #094859    Comp: #284bba  #ba9728
   Revert: cp theme-backup.css theme.css
   ══════════════════════════════════════════════════ */


/* ── Foundation ────────────────────────────────── */

body {
    background: #f0f2f5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a2332;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: #284bba; font-weight: 500; }
a:hover { color: #1e3d99; }


/* ── Header refinements ────────────────────────── */

.em-header-top {
    background: linear-gradient(135deg, #094859 0%, #0a6070 100%);
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

.em-header-bottom {
    background: #fff;
    border-bottom: 1px solid #e0e4e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 0;
}
.em-header-bottom li {
    border-left: none;
    border-right: none;
    padding: 8px 18px;
    transition: background 0.15s;
}
.em-header-bottom li:last-child { border-right: none; }
.em-header-bottom li:hover {
    background: rgba(9,72,89,0.06);
}
.em-header-bottom li a,
.menu-dropdown span {
    font-size: 13px;
    font-weight: 500;
    color: #3a4a5c;
}
.em-header-bottom li a:hover { color: #094859; }

.menu-dropdown-items {
    border-radius: 8px;
    border: 1px solid #e0e4e8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    margin-top: 2px;
}
.menu-dropdown-items li { padding: 8px 16px; }
.menu-dropdown-items li a { font-size: 13px; color: #3a4a5c; }
.menu-dropdown-items li:hover { background: rgba(9,72,89,0.05); }

.em-footer {
    background: #094859;
    font-size: 12px;
    letter-spacing: 0.3px;
}


/* ── Page heading ──────────────────────────────── */

.page-heading {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #094859;
    letter-spacing: -0.3px;
}


/* ── Panels ────────────────────────────────────── */

.edit-section {
    padding: 28px 32px;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e4e8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(9,72,89,0.06);
    transition: box-shadow 0.2s;
}
.edit-section:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(9,72,89,0.10);
}
.edit-section h4 {
    margin: 0 0 20px 0;
    font-size: 15px;
    font-weight: 700;
    color: #094859;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8ecf0;
    letter-spacing: -0.2px;
}


/* ── Form controls ─────────────────────────────── */

.edit-section .form-control,
.integration-panel .form-control,
.exclusion-panel .form-control {
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 12px;
    background: #fafbfc;
    color: #1a2332;
    transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}
.edit-section select.form-control,
.integration-panel select.form-control,
.exclusion-panel select.form-control {
    padding: 8px 12px;
}
.edit-section .form-control:focus,
.integration-panel .form-control:focus,
.exclusion-panel .form-control:focus {
    border-color: #094859;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(9,72,89,0.08);
    outline: none;
}


/* ── Tables inside panels ──────────────────────── */

.edit-section .data-table {
    border-collapse: separate;
    border-spacing: 0;
}
.edit-section .data-table > thead > tr > td,
.edit-section .data-table > thead > tr > th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8899a6;
    border-bottom: 1px solid #e0e4e8;
    border-left: none;
    border-right: none;
    padding: 8px 15px 10px;
}
.edit-section .data-table > tbody > tr > td {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
    height: 48px;
    vertical-align: middle;
    padding: 6px 15px;
}
.edit-section .data-table > tbody > tr:last-child > td {
    border-bottom: none;
}
.edit-section .data-table > tbody > tr > td:first-child {
    font-weight: 600;
    color: #6b7c8d;
    white-space: nowrap;
}
.edit-section .data-table > tbody > tr:hover > td {
    background: rgba(9,72,89,0.02);
}
.edit-section .data-table tr.odd,
.edit-section .data-table tr.even {
    background: #fff;
}


/* ── Input styling inside panels ──────────────── */

.edit-section .data-table .edit::before,
.edit-section .data-table .edit.changed::before {
    display: none;
}

.edit-section .data-table tbody tr td input[type=text],
.edit-section .data-table tbody tr td input[type=password],
.edit-section .data-table tbody tr td input[type=number],
.edit-section .data-table tbody tr td textarea {
    margin-left: 0;
    width: 100%;
    background: #fafbfc !important;
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    height: auto;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a2332;
    transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}
.edit-section .data-table tbody tr td input[type=text]:focus,
.edit-section .data-table tbody tr td input[type=password]:focus,
.edit-section .data-table tbody tr td input[type=number]:focus,
.edit-section .data-table tbody tr td textarea:focus {
    border-color: #094859;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(9,72,89,0.08);
    outline: none;
}

.edit-section .data-table tbody tr td select {
    margin-left: 0;
    width: 100%;
    background: #fafbfc;
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    height: auto;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a2332;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23094859' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
    transition: border 0.15s, box-shadow 0.15s;
}
.edit-section .data-table tbody tr td select:focus {
    border-color: #094859;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(9,72,89,0.08);
    outline: none;
}


/* ── Styled tables inside panels ──────────────── */

.edit-section .styled-table input:not([type='checkbox']),
.edit-section .styled-table textarea {
    background: #fafbfc !important;
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a2332;
    transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}
.edit-section .styled-table select {
    background: #fafbfc !important;
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a2332;
    transition: border 0.15s, box-shadow 0.15s, background 0.15s;
}
.edit-section .styled-table input:not([type='checkbox']):focus,
.edit-section .styled-table select:focus,
.edit-section .styled-table textarea:focus {
    border-color: #094859;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(9,72,89,0.08);
    outline: none;
}


/* ── Buttons ───────────────────────────────────── */

.btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.1px;
    transition: all 0.15s;
}
.btn-primary {
    background: #094859 !important;
    border-color: #094859 !important;
}
.btn-primary:hover {
    background: #0a6070 !important;
    border-color: #0a6070 !important;
    box-shadow: 0 2px 8px rgba(9,72,89,0.3);
}
.btn-secondary {
    background: #284bba !important;
    border-color: #284bba !important;
}
.btn-secondary:hover {
    background: #1e3d99 !important;
    border-color: #1e3d99 !important;
    box-shadow: 0 2px 8px rgba(40,75,186,0.3);
}
.btn-outline-secondary {
    color: #284bba !important;
    border-color: #c8d1e0 !important;
    background: transparent !important;
}
.btn-outline-secondary:hover {
    background: #284bba !important;
    border-color: #284bba !important;
    color: #fff !important;
}
.btn-danger {
    border-radius: 8px;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}


/* ── Checkbox ──────────────────────────────────── */

input[type="checkbox"] {
    accent-color: #094859;
}


/* ── Notes textareas ───────────────────────────── */

.notes-input {
    width: 100%;
    height: 400px;
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    font-size: 13px;
    padding: 14px;
    background: #fafbfc;
    line-height: 1.65;
    resize: vertical;
    transition: border 0.15s, box-shadow 0.15s;
}
.notes-input:focus {
    border-color: #094859;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(9,72,89,0.08);
    outline: none;
}


/* ── Back link ─────────────────────────────────── */

[id*="lnkBack"] {
    font-size: 13px;
    font-weight: 500;
    color: #6b7c8d;
    text-decoration: none;
}
[id*="lnkBack"]:hover {
    color: #094859;
}


/* ── Device pills ──────────────────────────────── */

.device-text {
    display: inline-block;
    white-space: nowrap;
    padding: 5px 12px;
    color: #1a2332 !important;
    margin-right: 6px;
    margin-bottom: 5px;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 500;
    background: #fff;
    transition: box-shadow 0.15s;
}
.device-text:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.device-name { color: #8899a6; font-weight: 400; }
.device-status-active {
    background: #f0faf0;
    border-color: #b2dfb2;
}
.device-status-inactive {
    background: #fef2f2;
    border-color: #f5c6c6;
}
.device-last-connect { color: #8899a6; font-size: 10px; }


/* ── Time ago badges ───────────────────────────── */

.time-ago {
    display: inline-block;
    background: #f0faf0;
    border: 1px solid #b2dfb2;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
}
.time-ago.expired {
    background: #fef2f2;
    border-color: #f5c6c6;
    color: #c0392b;
}


/* ── Tabs ──────────────────────────────────────── */

.nav-tabs {
    border-bottom: 2px solid #e0e4e8;
}
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
    font-weight: 600;
    color: #8899a6;
    padding: 10px 18px;
    transition: color 0.15s, border-color 0.15s;
}
.nav-tabs .nav-link:hover {
    color: #094859;
    border-color: transparent;
}
.nav-tabs .nav-link.active {
    color: #094859;
    background: transparent;
    border-color: #094859;
    border-bottom: 2px solid #094859;
}


/* ── Cards (email reports accordion) ───────────── */

.card {
    border-radius: 8px;
    border: 1px solid #e0e4e8;
    overflow: hidden;
    box-shadow: none;
}
.card-header {
    background: #fafbfc;
    border-bottom: 1px solid #e0e4e8;
    padding: 0;
}
.card-header a {
    font-weight: 500;
    color: #3a4a5c;
}
.card-body {
    background: #fff;
}


/* ── Standalone data tables (list pages) ────────── */

.data-table tr.odd {
    background-color: #f7f9fa;
}
.data-table tr.even {
    background-color: #fff;
}
.data-table > tbody > tr > td {
    border-left: none;
    border-right: none;
    border-color: #edf0f3;
    padding: 12px 15px;
}
.data-table tbody tr:first-child td { border-top: 1px solid #edf0f3; }
.data-table tbody tr:last-child td  { border-bottom: 1px solid #edf0f3; }
.data-table-clickable tbody tr:hover {
    background-color: rgba(9,72,89,0.06);
}


/* ── Color helpers ─────────────────────────────── */

.color-red { color: #dc3545; }


/* ── Scrollbar (webkit) ────────────────────────── */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f0f2f5; }
::-webkit-scrollbar-thumb { background: #c4cdd5; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8899a6; }
