/* ============================
   RESET BÁSICO
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", Arial, sans-serif;
}

/* ============================
   BODY / LAYOUT
============================ */
body {
    background: #f5f6fa;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0px 4px 20px rgba(0,0,0,0.08);
}

/* ============================
   HEADER
============================ */
.topbar {
    background: #20232a;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar .logo {
    font-size: 18px;
    font-weight: 600;
}

.topnav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 7px 15px;
    border-radius: 6px;
    background: #3498db;
    border: 1px solid #3498db;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.nav-btn:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.nav-btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.nav-btn-outline:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

/* ============================
   TÍTULOS
============================ */
h1, h2 {
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 600;
}

/* ============================
   BOTÕES GERAIS
============================ */
.button {
    padding: 8px 16px;
    background: #2ecc71;
    border-radius: 6px;
    border: none;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
}

.button:hover {
    background: #27ae60;
}

.button-danger {
    background: #e74c3c;
}

.button-danger:hover {
    background: #c0392b;
}

/* ============================
   FORMULÁRIOS
============================ */
.form-group {
    margin-bottom: 15px;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    background: #fff;
    transition: 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3498db;
    outline: none;
}

/* ============================
   TABELAS
============================ */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table thead {
    background: #ecf0f1;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.table tr:hover {
    background: #f7f9fb;
}

/* ============================
   ALERTAS
============================ */
.alert {
    padding: 14px;
    border-radius: 6px;
    margin-top: 15px;
}

.alert-success {
    background: #d4efdf;
    color: #1e8449;
}

.alert-error {
    background: #f5b7b1;
    color: #922b21;
}

/* ============================
   LOGIN / AUTENTICAÇÃO
============================ */
.auth-box {
    max-width: 480px;
    margin: 0 auto;
}

.auth-box h2 {
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

/* ============================
   LOGIN ESPECÍFICO
============================ */
.login-page {
    background: #f5f6fa;
}

.login-page .container {
    max-width: 480px;
    margin: 80px auto;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.login-page h2 {
    font-size: 32px;
    margin-bottom: 25px;
}

.login-page .button {
    width: 120px;
}

/* ============================
   COLUNA DE MENSAGEM (DETALHES)
============================ */
.msg-cell details {
    font-size: 12px;
}

.msg-cell summary {
    cursor: pointer;
    color: #3498db;
    text-decoration: underline;
    list-style: none;
}

.msg-cell summary::-webkit-details-marker {
    display: none;
}

.msg-full {
    margin-top: 6px;
    font-size: 12px;
    white-space: pre-wrap;
}

/* ============================
   RESPONSIVIDADE (MOBILE)
============================ */
@media (max-width: 768px) {
    body {
        background: #f5f6fa;
    }

    .container {
        max-width: 100%;
        width: 100%;
        margin: 10px 0;
        padding: 16px;
        border-radius: 0;
        box-shadow: none;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .topbar .logo {
        font-size: 16px;
    }

    .topnav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
   
        /* ... já tem outras regras ... */
    
        .cell-links {
            max-width: 100%;
            word-break: normal;
            white-space: normal;
        }
    
        /* Esconde a URL no mobile e deixa só o botão */
        .small-url {
            display: none;
        }
    
    
}
/* Células de link (webhook / rastreio) */
.cell-links {
    max-width: 240px;
    font-size: 11px;
    word-break: break-all;
}

.small-url {
    margin-bottom: 4px;
}

.copy-btn {
    padding: 4px 8px;
    font-size: 11px;
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    background: #2980b9;
}

.copy-btn:disabled {
    opacity: 0.7;
    cursor: default;
}
