/* ============================================================
   table2.css — Tema Tabel & Form Perpustakaan UPY
   Menggabungkan 2 kebutuhan dalam 1 file:
   - Form (ang_carianggota_formA.php) → tema body2.css (#f0f2f8)
   - Hasil/tabel (ang_carianggota_hasil.php) → tema report2.css (#cecece)
   Karena kedua file memanggil CSS yang sama (table.css),
   background diset #f0f2f8 (body2) sebagai default,
   dan semua elemen tabel hasil ikut tema report2.
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    background: #cecece;
    color: #1a1f2e;
    padding-left: 16px;
    padding-right: 16px;
}

/* ── Typography ── */
h1 { font-size: 18px; font-weight: 700; color: #1a1f2e; margin: 0 0 6px 0; }
h2 { font-size: 15px; font-weight: 600; color: #1a1f2e; margin: 0 0 4px 0; }
h3 { font-size: 14px; font-weight: 700; color: #1a1f2e; margin: 0 0 12px 0; }
b, strong { font-weight: 700; }
div { font-size: 13px; color: #1a1f2e; }
center { text-align: center; }

/* ── Table ── */
table {
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    border: none !important;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    width: 100%;
}

tr {
    border: none;
    font-size: 13px;
    color: #ffffff;
    background-color: #1a1f2e;
    transition: background .12s;
}

td, th {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 13px;
    border-left: none;
    border-right: none;
    border-top: none;
}

tr:last-child td { border-bottom: none; }
/*tr:hover td { background: #f5f5f8 !important; }*/

/* ── bgcolor override ── */

/* bgcolor=white */
tr[bgcolor="white"] td,
td[bgcolor="white"] { background: #ffffff !important; color: #1a1f2e !important; }

/* bgcolor=#1397e9 (header form biru) → aksen biru lembut */
tr[bgcolor="#1397e9"] td,
td[bgcolor="#1397e9"] {
    background: #1a1f2e !important;
    color: #f8f8f8 !important;
    font-weight: 500;
    padding: 10px 14px;
}

/* bgcolor=#2c69d3 (footer biru tua) → footer gelap */
tr[bgcolor="#2c69d3"] td,
td[bgcolor="#2c69d3"] {
    background: linear-gradient(135deg, #1a1f2e, #2d3561) !important;
    color: #ffffff !important;
    padding: 10px 12px;
}

/* bgcolor=#99d2f6 (header form biru muda) */
tr[bgcolor="#99d2f6"] td,
td[bgcolor="#99d2f6"] {
    background: #eef1ff !important;
    color: #1a1f2e !important;
    font-weight: 500;
    padding: 10px 14px;
}

/* bgcolor=#1188d3 */
tr[bgcolor="#1188d3"] td,
td[bgcolor="#1188d3"] {
    background: linear-gradient(135deg, #1a1f2e, #2d3561) !important;
    color: #ffffff !important;
}

/* bgcolor=#9999AA (sub-header tabel) */
tr[bgcolor="#9999AA"] td, tr[bgcolor="#9999aa"] td {
    background: #e8eaf0 !important;
    color: #8a94a6 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* bgcolor=#9999CC (header kolom tabel) */
tr[bgcolor="#9999CC"] td, tr[bgcolor="#9999cc"] td,
tr[bgcolor="#9999CC"] th, tr[bgcolor="#9999cc"] th {
    background: #f0f2f8 !important;
    color: #8a94a6 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 8px 12px;
    border-bottom: 2px solid #e8eaf0;
}

/* bgcolor baris bergantian */
tr[bgcolor="#DDDDDD"] td, tr[bgcolor="#dddddd"] td { background: #f5f5f8 !important; color: #1a1f2e !important; }
tr[bgcolor="#CCCCCC"] td, tr[bgcolor="#cccccc"] td { background: #ffffff !important; color: #1a1f2e !important; }
tr[bgcolor="#EFEFF8"] td { background: #f8f9ff !important; }
tr[bgcolor="#FFF1B8"] td { background: #fffef0 !important; }
tr[bgcolor="#FFFBC7"] td { background: #fffef5 !important; }

/* bgcolor warna aksi */
th[bgcolor="red"],    td[bgcolor="red"]    { background: #fff0ec !important; color: #e8613c !important; font-weight: 700 !important; }
th[bgcolor="green"],  td[bgcolor="green"]  { background: #e6fbf5 !important; color: #20c997 !important; font-weight: 700 !important; }
th[bgcolor="yellow"], td[bgcolor="yellow"] { background: #fff8e1 !important; color: #f59e0b !important; font-weight: 700 !important; }
th[bgcolor="darkblue"], td[bgcolor="darkblue"] { background: #eef1ff !important; color: #4f6ef7 !important; font-weight: 700 !important; }
td[bgcolor="#666699"] { background: #f0f2f8 !important; color: #8a94a6 !important; font-weight: 600 !important; font-size: 11px !important; }

tr[bgcolor="#ff3d00"] td {
    background: linear-gradient(135deg, #1a1f2e, #2d3561) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* ── Form elements ── */
form { margin: 0; }

input[type="text"],
input[type="date"],
input[type="search"],
input[type="number"] {
    padding: 7px 12px;
    border: 1.5px solid #d0d4dc;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    color: #1a1f2e;
    outline: none;
    transition: border-color .2s;
    margin: 0;
}
input[type="text"]:focus,
input[type="date"]:focus { border-color: #4f6ef7; }

input[type="checkbox"],
input[type="radio"] {
    accent-color: #4f6ef7;
    cursor: pointer;
    vertical-align: middle;
    margin: 0 4px;
}

select {
    padding: 6px 10px;
    border: 1.5px solid #d0d4dc;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    color: #1a1f2e;
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}
select:focus { border-color: #4f6ef7; }

input[type="submit"] {
    padding: 7px 18px;
    background: #4f6ef7;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .2s;
    margin: 0;
}
input[type="submit"]:hover { opacity: .85; }

input[type="button"],
input[type="reset"] {
    padding: 7px 16px;
    background: #e8eaf0;
    color: #1a1f2e !important;
    border: 1px solid #d0d4dc;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    margin: 0;
}
input[type="button"]:hover,
input[type="reset"]:hover { background: #d8dae8; }

/* ── Link ── */
a:link, a:visited {
    color: #4f6ef7;
    text-decoration: none;
    font-weight: 600;
}
a:hover {
    color: #3d5ce0;
    text-decoration: underline;
    font-weight: 600;
}

/* ── font color override ── */
font[color="#3D466B"], font[color="#3d466b"] { color: #1a1f2e !important; }
font[color="red"]      { color: #e8613c !important; font-weight: 600; }
font[color="green"]    { color: #20c997 !important; font-weight: 600; }
font[color="blue"]     { color: #4f6ef7 !important; }
font[color="white"]    { color: #1a1f2e !important; }
font[color="#006699"]  { color: #4f6ef7 !important; font-weight: 600; }
font[color="#330066"]  { color: #1a1f2e !important; font-weight: 700; }
font[color="#669999"]  { color: #38d9a9 !important; }
font[color="#999999"]  { color: #8a94a6 !important; }
font[color="gray"]     { color: #8a94a6 !important; }
font[color="#bf360c"]  { color: #e8613c !important; font-weight: 700; }
font[color="#330099"]  { color: #4f6ef7 !important; font-weight: 700; }
font[color="darkblue"] { color: #4f6ef7 !important; font-weight: 700; }

/* ── Gambar ── */
img { max-width: 100%; vertical-align: middle; }

/* ── Print ── */
@media print {
    body { background: #ffffff; padding: 0; }
    table { box-shadow: none; border: 1px solid #cccccc !important; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #b0b4c0; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Utility ── */
.text-muted  { color: #8a94a6 !important; }
.text-accent { color: #4f6ef7 !important; }
.text-red    { color: #e8613c !important; }
.text-green  { color: #20c997 !important; }
