/* =====================================================
   WTS Emergency SMS Notifier — Global Styles
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
    background: #b6b7bc;
    font-size: .875rem;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

/* ---- Page Shell ---- */
.page {
    max-width: 960px;
    background: #fff;
    margin: 20px auto;
    border: 1px solid #496077;
    border-radius: 4px;
    overflow: hidden;
}

/* ---- Header ---- */
.site-header {
    background: #3a6186;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.site-header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.top-nav { display: flex; gap: 16px; align-items: center; }
.top-nav a { color: #d0e4ff; text-decoration: none; font-size: .9rem; }
.top-nav a:hover { color: #fff; text-decoration: underline; }
.top-nav a.active { color: #fff; font-weight: 600; }

/* ---- Main content ---- */
.main-content { padding: 24px; min-height: 400px; }

/* ---- Footer ---- */
.site-footer {
    background: #eef0f2;
    border-top: 1px solid #ccc;
    padding: 8px 20px;
    font-size: .8rem;
    color: #666;
    text-align: center;
}

/* ---- Login ---- */
.login-container { max-width: 360px; }
.login-container h2 { margin-bottom: 16px; }

/* ---- Send form ---- */
.send-form { max-width: 560px; }
.message-box { width: 100%; resize: vertical; }
.recipient-options { margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.recipient-options label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.send-btn { min-width: 100px; margin-top: 8px; }

/* ---- Recipients table ---- */
.recipients-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.recipients-table th, .recipients-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    font-size: .85rem;
}
.recipients-table thead th { background: #3a6186; color: #fff; }

/* ---- Login Log ---- */
.log-stats { margin-bottom: 12px; font-weight: 500; }
.locked-badge {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .8rem;
    margin-left: 12px;
}
.log-filter { margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.log-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.log-table th, .log-table td { border: 1px solid #ccc; padding: 5px 9px; }
.log-table thead th { background: #3a6186; color: #fff; }
.row-success { background: #f0fff4; }
.row-failure { background: #fff5f5; }
.ua-cell { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Bootstrap-lite alerts / buttons ---- */
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.btn { display: inline-block; padding: 6px 14px; border-radius: 4px; border: none; cursor: pointer; font-size: .875rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: #3a6186; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2d4f6e; }
.btn-danger  { background: #c0392b; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #96281b; }
.btn-warning { background: #e0a800; color: #212529; }
.btn-warning:hover:not(:disabled) { background: #c69500; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #545b62; }
.btn-sm { padding: 3px 10px; font-size: .8rem; }

.form-control { width: 100%; padding: 6px 10px; border: 1px solid #ced4da; border-radius: 4px; font-size: .875rem; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; }
