/* -------------------------
   Estilos gerais
------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #111;
    color: #eee;
    padding-bottom: 60px;
}

/* -------------------------
   Header + Navegação
------------------------- */
header {
    background: #1d1d1d;
    padding: 20px;
    border-bottom: 2px solid #333;
}

header h1 {
    margin-bottom: 10px;
}

nav {
    display: flex;
    gap: 15px;
}

nav a {
    color: #bbb;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: 0.2s;
}

nav a:hover {
    background: #333;
    color: #fff;
}

/* -------------------------
   Cards
------------------------- */
.card {
    background: #1c1c1c;
    padding: 25px;
    margin: 30px auto;
    max-width: 900px;
    border-radius: 8px;
    border: 1px solid #333;
}

/* -------------------------
   Formulários
------------------------- */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

input, textarea, select {
    padding: 10px;
    border: 1px solid #444;
    background: #222;
    color: #eee;
    border-radius: 5px;
}

button {
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: #0066ff;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #004fcc;
}

/* -------------------------
   Tabelas
------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    border-bottom: 1px solid #333;
}

table th {
    background: #222;
}

table tr:hover {
    background: #1a1a1a;
}

/* -------------------------
   Table Column Formatting
------------------------- */

/* Notes column: ellipsis trimming */
#clientsTable td:nth-child(4) {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Buttons column (Ações) */
.actions-col {
    width: 140px;
    text-align: right;
    white-space: nowrap;
}

.actions-col button {
    margin-left: 8px;
}

/* -------------------------
   MODAL SYSTEM
------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal {
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    color: white;
    width: 450px;
    margin: auto;
    border: 1px solid rgba(255,255,255,0.12);
    animation: popIn 0.25s ease;
}

.modal-box {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 18px;
    color: #eee;
}

.btn-confirm {
    flex: 1;
    padding: 12px;
    background: #0066ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-confirm:hover {
    background: #0050cc;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: #444;
    color: #eee;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-cancel:hover {
    background: #555;
}

#modalClose {
    width: 100%;
    padding: 12px;
    background: #0066ff;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

#modalClose:hover {
    background: #0050cc;
}

/* Make modal edit fields readable and full width */
.modal-box input,
.modal-box textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    background: #222;
    border: 1px solid #444;
    color: #eee;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Resize textarea properly in modal */
.modal-box textarea {
    min-height: 80px;
    resize: vertical;
}



/* -------------------------
   Histórico – tabela
------------------------- */

#historyTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#historyTable th,
#historyTable td {
    padding: 12px;
    border-bottom: 1px solid #333;
}

#historyTable th {
    background: #222;
    text-align: left;
}

#historyTable tr:hover {
    background: #1a1a1a;
}

/* Last column (Detalhes) – center the button and fix width */
#historyTable th:last-child,
#historyTable td:last-child {
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

#searchInput {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #444;
    background: #222;
    color: #eee;
    border-radius: 5px;
    font-size: 15px;
}

.client-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.client-info {
    color: #eee;
    line-height: 1.4;
}

.phone {
    color: #bbb;
}

.deliver-all-btn {
    background: #0066ff;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.deliver-all-btn:hover {
    background: #0050cc;
}

th.searching {
    padding: 0 !important;
}



