/* =========================
   BASE
========================= */
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background .3s, color .3s;
}

a {
    text-decoration: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    background: #2563eb;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

header h1 {
    margin: 0;
    font-size: 22px;
}

header span {
    font-size: 13px;
    opacity: 0.8;
}

nav {
    padding: 10px 40px;
}

main {
    padding: 30px 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 14px;
}

th {
    text-align: left;
    font-size: 14px;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 14px;
    opacity: 0.7;
}

/* =========================
   SELETOR DE TEMA
========================= */
.theme-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.theme-switch select {
    appearance: none;
    padding: 6px 28px 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='gray' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E")
        no-repeat right 8px center;
    background-size: 16px;
    cursor: pointer;
}

/* =========================
   BUSCA – COMPONENTE MODERNO
========================= */
.search-container {
    margin-bottom: 28px;
}

.search-container .search-box {
    width: 100%;
    max-width: 600px;
}

.search-container .search-box input {
    width: 100%;
    padding: 16px 22px;
    font-size: 15px;
    font-family: inherit;

    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;

    outline: none;
    box-sizing: border-box;

    transition: 
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

/* foco */
.search-container .search-box input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* placeholder */
.search-container .search-box input::placeholder {
    color: #9ca3af;
}

/* =========================
   THEME — GOOGLE DRIVE
========================= */
body[data-theme="drive"] {
    background: #f4f6f8;
    color: #333;
}

body[data-theme="drive"] header,
body[data-theme="drive"] nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

body[data-theme="drive"] table {
    background: #ffffff;
}

body[data-theme="drive"] th {
    background: #f1f3f6;
}

body[data-theme="drive"] tr:hover {
    background: #f9fafb;
}

/* =========================
   THEME — PORTAL SOFTWARE
========================= */
body[data-theme="portal"] {
    background: #eef1f5;
    color: #1f2937;
}

body[data-theme="portal"] header {
    background: #1f2937;
    color: #fff;
}

body[data-theme="portal"] nav {
    background: #111827;
}

body[data-theme="portal"] table {
    background: #ffffff;
}

body[data-theme="portal"] th {
    background: #e5e7eb;
}

/* =========================
   THEME — DARK KINYX
========================= */
body[data-theme="dark"] {
    background: #0b1220;
    color: #e5e7eb;
}

body[data-theme="dark"] header,
body[data-theme="dark"] nav {
    background: #020617;
    border-bottom: 1px solid #1e293b;
}

body[data-theme="dark"] table {
    background: #020617;
}

body[data-theme="dark"] th {
    background: #020617;
    color: #38bdf8;
}

body[data-theme="dark"] td {
    border-bottom: 1px solid #1e293b;
}

body[data-theme="dark"] .search-container .search-box input {
    background: #020617;
    color: #e5e7eb;
    border-color: #1e293b;
}

body[data-theme="dark"] .search-container .search-box input::placeholder {
    color: #64748b;
}
body main .search-container .search-box .search-input {
    width: 100%;
    max-width: 600px;
    padding: 16px 22px;

    font-size: 15px;
    font-family: 'Segoe UI', Arial, sans-serif;

    border-radius: 999px;
    border: 1px solid #d1d5db;

    background-color: #ffffff;
    outline: none;
    box-sizing: border-box;
}

body main .search-container .search-box .search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.18);
}

body[data-theme="dark"] main .search-container .search-box .search-input {
    background-color: #020617;
    color: #e5e7eb;
    border-color: #1e293b;
}

/* =========================
   LINKS – ESTILO MODERNO
========================= */
table a {
    color: inherit;
    font-weight: 500;
    transition: color .2s ease, opacity .2s ease;
}

/* remove roxo e azul padrão */
table a:link,
table a:visited,
table a:active {
    color: inherit;
    text-decoration: none;
}

/* hover elegante */
table a:hover {
    opacity: 0.85;
}

/* =========================
   LINKS — DARK MODE
========================= */
body[data-theme="dark"] table a {
    color: #e5e7eb; /* branco suave */
}

body[data-theme="dark"] table a:hover {
    color: #38bdf8; /* azul Kinyx moderno */
}
/* =========================
   LINKS — TEMAS CLAROS (OPCIONAL)
========================= */
body[data-theme="drive"] table a,
body[data-theme="portal"] table a {
    color: #2563eb;
}

body[data-theme="drive"] table a:hover,
body[data-theme="portal"] table a:hover {
    color: #1d4ed8;
}

/* =========================
   LINKS GLOBAIS (HEADER / NAV)
========================= */
header a,
nav a {
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}

header a:link,
header a:visited,
header a:active,
nav a:link,
nav a:visited,
nav a:active {
    color: inherit;
}

header a:hover,
nav a:hover {
    opacity: 0.85;
}


/* =========================
   LINKS HEADER — DARK MODE
========================= */
body[data-theme="dark"] header a,
body[data-theme="dark"] nav a {
    color: #e5e7eb;
}

body[data-theme="dark"] header a:hover,
body[data-theme="dark"] nav a:hover {
    color: #38bdf8;
}


body[data-theme="drive"] header a,
body[data-theme="portal"] header a {
    color: #2563eb;
}

body[data-theme="drive"] header a:hover,
body[data-theme="portal"] header a:hover {
    color: #1d4ed8;
}
/* =========================
   SELECT TEMA — COR DO TEXTO
========================= */

/* Dark Kinyx */
body[data-theme="dark"] .theme-switch select {
    color: #e5e7eb;
    background-color: #020617;
    border-color: #1e293b;
}

/* Portal */
body[data-theme="portal"] .theme-switch select {
    color: #e5e7eb;
    background-color: #111827;
    border-color: #1f2937;
}

/* Opcional: seta do select no dark */
body[data-theme="dark"] .theme-switch select,
body[data-theme="portal"] .theme-switch select {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%23e5e7eb' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
}
