:root {
    --primary-color: #00B960;
    --secondary-color: #1A1A2E;
    --danger-color: #E53935;
    --warning-color: #FFA000;
    --text-color: #FFFFFF;
    --bg-color: #0F0F1E;
    --card-bg: #14142B;
    --border-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 800px;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 50px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 24px;
}

header p {
    opacity: 0.6;
    font-size: 14px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.5;
    transition: 0.3s;
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding-top: 20px;
}

.tab-content.active {
    display: block;
}

/* Form Styles - Forçando background escuro */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color) !important;
    color: white !important;
    box-sizing: border-box;
    font-size: 16px;
}

/* Estilo para quando o navegador preenche automaticamente */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--secondary-color) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 13px;
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

/* List Section */
.search-box {
    margin-bottom: 20px;
}

.users-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.user-card {
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.user-card:hover { border-color: var(--primary-color); }

.status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
}

.status-active { background: #00B96033; color: #00B960; }
.status-inactive { background: #E5393533; color: #E53935; }

button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background-color: #444; color: white; }
.btn-danger { background-color: var(--danger-color); color: white; }
.btn-warning { background-color: var(--warning-color); color: white; }
.btn-outline { background-color: transparent; border: 1px solid #555; color: white; }

footer {
    margin-top: 25px;
    text-align: center;
    min-height: 24px;
}

#status-msg {
    font-size: 15px;
    font-weight: bold;
}

/* Chat / Renovações */
.renewal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.renewal-filter.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.summary-card {
    background: var(--secondary-color);
    border: 1px solid #2b2b45;
    border-radius: 10px;
    padding: 10px;
}
.summary-card strong { display: block; font-size: 22px; color: var(--primary-color); }
.renewal-card {
    background-color: var(--secondary-color);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
}
.renewal-card:hover, .renewal-card.active { border-color: var(--primary-color); }
.renewal-card h4 { margin: 0 0 5px; }
.renewal-card p { margin: 3px 0; opacity: .78; font-size: 13px; }
.chat-admin-box {
    background: #0d0d1d;
    border: 1px solid #2b2b45;
    border-radius: 12px;
    padding: 12px;
    min-height: 480px;
}
.admin-messages {
    height: 300px;
    overflow-y: auto;
    background: #090914;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-msg {
    max-width: 86%;
    padding: 9px 11px;
    border-radius: 12px;
    white-space: pre-wrap;
    line-height: 1.35;
}
.admin-msg.client { align-self: flex-start; background: #24244a; }
.admin-msg.admin { align-self: flex-end; background: var(--primary-color); }
.admin-msg.system { align-self: flex-start; background: #333; }
.admin-msg small { display:block; opacity:.65; font-size:11px; margin-top:4px; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
    #tab-renewals .form-section > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
}

.content-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.content-card h4 { margin: 0 0 8px; color: #fff; }
.content-card p { margin: 6px 0; opacity: .85; }
.content-images { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.content-images img { width: 110px; height: 155px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); }
.content-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.admin-msg-images { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.admin-msg-images img { max-width: 150px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); }


/* PWA Admin / mobile first improvements */
.admin-top-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.admin-renewal-layout {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
    gap: 15px;
    align-items: start;
}

.needs-answer-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 160, 0, .18);
    color: #ffca6a;
    font-size: 12px;
}

.renewal-card.awaiting-human {
    border-color: #FFA000;
    box-shadow: 0 0 0 1px rgba(255, 160, 0, .2);
}

#admin-toast-wrap {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 28px));
}

.admin-toast {
    width: 100%;
    text-align: left;
    background: #1f1f3a;
    color: #fff;
    border: 1px solid #00B960;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}
.admin-toast strong { display: block; color: #00B960; margin-bottom: 4px; }
.admin-toast span { display: block; font-weight: 500; opacity: .9; }

html { min-height: 100%; background: var(--bg-color); }

select, input[type="number"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color) !important;
    color: white !important;
    box-sizing: border-box;
    font-size: 16px;
}

@media (max-width: 900px) {
    body {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    .container {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        padding: 14px;
        border-radius: 0;
        box-sizing: border-box;
    }
    header {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(20, 20, 43, .96);
        backdrop-filter: blur(8px);
        padding-top: 8px;
        margin: -14px -14px 16px;
        padding-left: 14px;
        padding-right: 14px;
        border-bottom: 1px solid #25253d;
    }
    header h1, #panel-title { font-size: 20px; }
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 6px;
        padding-bottom: 8px;
    }
    .tab-btn {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 10px 12px;
        font-size: 13px;
    }
    .form-section,
    .content-card,
    .chat-admin-box {
        padding: 12px !important;
    }
    .admin-renewal-layout {
        grid-template-columns: 1fr !important;
    }
    .summary-grid {
        grid-template-columns: repeat(4, minmax(70px, 1fr));
        gap: 6px;
    }
    .summary-card {
        padding: 8px;
        text-align: center;
    }
    .summary-card strong { font-size: 18px; }
    .chat-admin-box {
        min-height: auto;
        position: relative;
    }
    .admin-messages {
        height: 48vh;
        min-height: 280px;
    }
    .user-card {
        align-items: stretch;
        gap: 12px;
        flex-direction: column;
    }
    .user-card > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }
    .actions,
    .content-actions {
        grid-template-columns: 1fr !important;
    }
    .quick-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container { padding: 10px; }
    header { margin: -10px -10px 14px; padding-left: 10px; padding-right: 10px; }
    #admin-content > header > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    .admin-top-actions {
        justify-content: stretch;
    }
    .admin-top-actions button {
        flex: 1;
    }
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .renewal-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .renewal-filter {
        padding: 10px 8px;
        font-size: 12px;
    }
    .admin-msg { max-width: 94%; }
    #admin-chat-input {
        min-width: 0;
    }
    #btnSendAdminChat {
        min-width: 82px;
    }
    .chat-admin-box > div[style*="display:flex"] {
        flex-wrap: wrap;
    }
    .chat-admin-box > div[style*="display:flex"] input {
        flex: 1 1 100%;
    }
}

/* ===== Ajustes finais de experiência web/admin ===== */
* { box-sizing: border-box; }
body {
    background:
        radial-gradient(circle at top left, rgba(0,185,96,.08), transparent 34%),
        radial-gradient(circle at top right, rgba(80,80,180,.10), transparent 30%),
        var(--bg-color);
    padding: clamp(14px, 3vw, 42px) 12px;
    align-items: flex-start;
}
.container {
    width: min(1180px, calc(100vw - 24px));
    max-width: 1180px;
    padding: clamp(18px, 2.6vw, 34px);
    border: 1px solid rgba(255,255,255,.06);
}
#admin-content > header > div {
    gap: 14px;
}
#panel-title {
    letter-spacing: .2px;
}
.admin-top-actions button,
#btnLogout {
    min-height: 42px;
}
.tabs {
    gap: 6px;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 12px;
}
.tab-btn {
    border-radius: 10px;
    min-height: 44px;
    padding: 10px 14px;
    line-height: 1.08;
    min-width: 112px;
}
.tab-btn.active {
    background: rgba(0,185,96,.08);
    box-shadow: inset 0 -2px 0 var(--primary-color);
    border-bottom: 0;
}
.tab-content {
    padding-top: 28px;
}
.form-section {
    background: rgba(255,255,255,.018);
    border-radius: 16px;
}
#tab-renewals .form-section > p,
#tab-content-updates .form-section > p {
    max-width: 780px;
    line-height: 1.45;
}
.renewal-filters {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(20,20,43,.96);
    padding: 8px 0;
}
.renewal-filter {
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.16);
}
.summary-grid {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 10px;
}
.summary-card {
    min-height: 76px;
}
.admin-renewal-layout {
    grid-template-columns: minmax(300px, .95fr) minmax(420px, 1.35fr);
    gap: 18px;
}
#renewal-list.users-grid {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}
.renewal-card {
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.renewal-card:hover {
    transform: translateY(-1px);
}
.chat-admin-box {
    position: sticky;
    top: 92px;
    min-height: 560px;
    display: flex;
    flex-direction: column;
}
.admin-messages {
    flex: 1;
    height: 420px;
    min-height: 360px;
    scrollbar-width: thin;
}
.admin-msg {
    font-size: 14px;
    word-break: break-word;
}
.admin-msg.client { border-bottom-left-radius: 4px; }
.admin-msg.admin { border-bottom-right-radius: 4px; color: #fff; }
.admin-msg.system { background: #2b2b3d; }
#admin-chat-input {
    min-height: 48px;
}
#btnSendAdminChat {
    min-width: 96px;
}
.quick-actions button {
    flex: 1 1 180px;
}
.content-card {
    transition: border-color .15s ease, background .15s ease;
}
.content-card:hover {
    border-color: rgba(0,185,96,.32);
}
.content-images img,
.admin-msg-images img {
    background: #080812;
}
body.public-home {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.public-landing {
    width: min(720px, calc(100vw - 28px));
    background: rgba(20,20,43,.96);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    padding: clamp(24px, 5vw, 44px);
    box-shadow: 0 18px 48px rgba(0,0,0,.45);
    text-align: center;
}
.public-landing h1 {
    color: var(--primary-color);
    margin: 0 0 10px;
    font-size: clamp(28px, 5vw, 42px);
}
.public-landing p {
    opacity: .82;
    line-height: 1.55;
    margin: 0 auto 20px;
    max-width: 560px;
}
.public-landing-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 22px;
}
.public-landing a {
    text-decoration: none;
    text-align: center;
}

@media (max-width: 980px) {
    .admin-renewal-layout {
        grid-template-columns: 1fr;
    }
    .chat-admin-box {
        position: relative;
        top: auto;
    }
    #renewal-list.users-grid {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 760px) {
    body {
        padding: 0;
        background: var(--bg-color);
    }
    .container {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        border: 0;
        padding: 12px;
    }
    #admin-content > header > div {
        flex-direction: row;
        align-items: center !important;
    }
    #panel-title {
        font-size: 19px;
        line-height: 1.12;
    }
    .admin-top-actions {
        flex: 0 0 auto;
        gap: 6px;
    }
    .admin-top-actions button {
        padding: 8px 10px;
        font-size: 12px;
        min-height: 38px;
    }
    .tabs {
        margin-left: -2px;
        margin-right: -2px;
    }
    .tab-btn {
        min-width: 96px;
        font-size: 12px;
        padding: 9px 10px;
    }
    .tab-content {
        padding-top: 18px;
    }
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .renewal-filters {
        top: 78px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .renewal-filter {
        width: 100%;
        font-size: 12px;
        padding: 10px 6px;
    }
    .chat-admin-box {
        border-radius: 14px;
        min-height: 0;
    }
    .admin-messages {
        height: 52dvh;
        min-height: 300px;
    }
    .admin-msg {
        max-width: 96%;
        font-size: 14px;
    }
    .chat-admin-box > div[style*="display:flex"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
    #btnSendAdminChat,
    #btnMarkRenewed,
    #btnOpenClientChat {
        width: 100%;
    }
    .content-images img {
        width: 92px;
        height: 132px;
    }
    .public-landing-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .container { padding: 10px; }
    #panel-title { font-size: 17px; }
    .admin-top-actions button {
        font-size: 11px;
        padding: 8px;
    }
    .summary-card strong { font-size: 20px; }
    .admin-messages {
        height: 50dvh;
        min-height: 280px;
    }
}


/* Ajuste final da página pública e identidade do painel */
.public-logo {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(0,185,96,.12);
    border: 1px solid rgba(0,185,96,.35);
    color: var(--primary-color);
    font-weight: 900;
    font-size: 22px;
}
.public-chat-form {
    margin: 22px auto 0;
    max-width: 560px;
    text-align: left;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 16px;
}
.public-chat-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}
.public-chat-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}
.public-chat-row input {
    min-height: 42px;
}
.public-chat-form small {
    display: block;
    margin-top: 10px;
    color: rgba(255,255,255,.62);
    line-height: 1.4;
}
.public-landing-actions {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.public-landing-actions .btn-outline,
.public-landing-actions .btn-primary {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
}
#panel-title {
    letter-spacing: -0.02em;
}
@media (max-width: 560px) {
    .public-chat-row {
        grid-template-columns: 1fr;
    }
    .public-chat-row button,
    .public-landing-actions a {
        width: 100%;
    }
}

/* ===== NewStream Admin - refinamento visual leve v3 ===== */
:root {
    --surface-1: rgba(20, 20, 43, .94);
    --surface-2: rgba(255,255,255,.045);
    --surface-3: rgba(255,255,255,.065);
    --line-soft: rgba(255,255,255,.09);
    --line-focus: rgba(0,185,96,.52);
    --muted-text: rgba(255,255,255,.68);
    --shadow-soft: 0 20px 55px rgba(0,0,0,.38);
}

body {
    color-scheme: dark;
    background:
        radial-gradient(circle at 12% 4%, rgba(0, 185, 96, .10), transparent 24rem),
        radial-gradient(circle at 82% 0%, rgba(91, 111, 255, .10), transparent 22rem),
        linear-gradient(180deg, #0d0d1b 0%, #101022 52%, #0b0b16 100%);
}

.container {
    background: linear-gradient(180deg, rgba(20,20,43,.98), rgba(17,17,35,.98));
    box-shadow: var(--shadow-soft);
}

#admin-content > header {
    text-align: left;
}

#admin-content > header > div:first-child {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

#panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(22px, 2.4vw, 30px);
}

#panel-title::before {
    content: "NS";
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(0,185,96,.12);
    border: 1px solid rgba(0,185,96,.35);
    color: var(--primary-color);
    font-size: 13px;
    letter-spacing: .06em;
}

.admin-top-actions .btn-outline,
#btnLogout {
    background: rgba(255,255,255,.035);
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.admin-top-actions .btn-outline:hover,
#btnLogout:hover,
.btn-outline:hover {
    border-color: var(--line-focus);
    background: rgba(0,185,96,.08);
}

.tabs {
    border-bottom: 0;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    padding: 8px;
}

.tab-btn {
    color: rgba(255,255,255,.82);
    opacity: .72;
    border: 1px solid transparent;
}

.tab-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.08);
}

.tab-btn.active {
    background: linear-gradient(180deg, rgba(0,185,96,.18), rgba(0,185,96,.08));
    border: 1px solid rgba(0,185,96,.28);
    color: #16e483;
}

.form-section,
.chat-admin-box,
.content-card,
.renewal-card,
.user-card,
.summary-card {
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    box-shadow: 0 10px 26px rgba(0,0,0,.16);
}

.form-section {
    padding: 18px;
}

.form-section > h3,
.tab-content h3 {
    margin-top: 0;
    font-size: 21px;
    letter-spacing: -.01em;
}

.form-section > p,
.tab-content p {
    color: var(--muted-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="number"],
textarea,
select {
    min-height: 46px;
    background: rgba(10,10,24,.72) !important;
    border-color: rgba(255,255,255,.12);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea { line-height: 1.45; }

input:focus,
textarea:focus,
select:focus {
    border-color: var(--line-focus);
    box-shadow: 0 0 0 3px rgba(0,185,96,.10);
    background: rgba(10,10,24,.92) !important;
}

label {
    color: rgba(255,255,255,.86);
    letter-spacing: .01em;
}

button,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-danger,
.btn-warning {
    min-height: 42px;
    border-radius: 11px;
}

.btn-primary {
    background: linear-gradient(180deg, #08d774, #00b960);
    box-shadow: 0 12px 24px rgba(0,185,96,.18);
}

.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.10); }
.btn-danger { background: linear-gradient(180deg, #ff514d, #e53935); }

.users-grid,
#content-updates-list,
#renewal-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,185,96,.55) rgba(255,255,255,.04);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.035); border-radius: 999px; }
::-webkit-scrollbar-thumb { background: rgba(0,185,96,.45); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,185,96,.65); }

.user-card,
.renewal-card,
.content-card {
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.user-card:hover,
.renewal-card:hover,
.content-card:hover {
    transform: translateY(-1px);
    background: var(--surface-3);
    border-color: rgba(0,185,96,.28);
}

.status-badge,
.needs-answer-badge {
    font-weight: 800;
    letter-spacing: .02em;
}

.summary-card {
    position: relative;
    overflow: hidden;
}

.summary-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(0,185,96,.10);
}

.admin-renewal-layout {
    align-items: stretch;
}

.chat-admin-box {
    background: linear-gradient(180deg, rgba(13,13,29,.98), rgba(11,11,23,.98));
}

#chat-admin-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.admin-messages {
    border: 1px solid rgba(255,255,255,.06);
    background: #080814;
}

.admin-msg {
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.admin-msg.client {
    background: #242449;
    border: 1px solid rgba(255,255,255,.06);
}

.admin-msg.admin {
    background: linear-gradient(180deg, #07cf70, #00b960);
}

.admin-msg.system {
    background: #2e2e42;
    color: rgba(255,255,255,.90);
}

.content-images img,
.admin-msg-images img {
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

.search-box input {
    min-height: 50px;
    font-size: 15px;
}

/* Desktop: aproveita melhor telas grandes sem ficar pesado */
@media (min-width: 1180px) {
    .container {
        width: min(1320px, calc(100vw - 42px));
        max-width: 1320px;
    }
    .admin-renewal-layout {
        grid-template-columns: minmax(360px, .9fr) minmax(560px, 1.5fr);
    }
    .admin-messages {
        min-height: 430px;
    }
}

/* Tablet e celular: área de toque maior e sem cortes */
@media (max-width: 760px) {
    #admin-content > header {
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    #admin-content > header > div:first-child {
        padding-bottom: 10px;
    }
    #panel-title::before {
        width: 32px;
        height: 32px;
        border-radius: 11px;
        font-size: 11px;
    }
    .tabs {
        border-radius: 14px;
        padding: 6px;
    }
    .tab-btn {
        min-height: 40px;
    }
    .form-section {
        padding: 14px;
        border-radius: 15px;
    }
    .admin-top-actions .btn-outline,
    #btnLogout {
        box-shadow: none;
    }
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    input[type="date"],
    input[type="number"],
    textarea,
    select {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    #panel-title {
        font-size: 16px;
        gap: 7px;
    }
    #panel-title::before {
        display: none;
    }
    .admin-top-actions {
        max-width: 154px;
    }
    .admin-top-actions button {
        min-height: 34px;
        border-radius: 9px;
    }
    .tab-btn {
        min-width: 88px;
    }
    .summary-card {
        min-height: 70px;
    }
    .content-images img {
        width: 86px;
        height: 122px;
    }
}
