* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, Roboto, Arial, sans-serif;
    background: #f2f4f7;
    color: #222;
    padding-bottom: 40px;
}

a {
    text-decoration: none;
    color: inherit;
}

.topbar {
    background: #2c3e50;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar h1 {
    font-size: 18px;
    margin: 0;
}

.menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.menu {
    background: #34495e;
    display: none;
    flex-direction: column;
}

.menu.aberto {
    display: flex;
}

.menu a {
    color: #fff;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 15px;
}

.menu a:active {
    background: #2c3e50;
}

.menu a.menu-perigo {
    color: #ff8a80;
}

.container {
    padding: 14px;
    max-width: 700px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card .linha-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.card .data {
    font-size: 13px;
    color: #888;
}

.card .cliente {
    font-size: 17px;
    font-weight: 600;
    margin: 2px 0 8px 0;
}

.card .valores {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.card .valores .valor-total {
    font-weight: 600;
}

.card .valores .valor-pago {
    color: #27ae60;
}

.card .valores .valor-qtd {
    color: #777;
}

.card .acoes {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-block;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    flex: 1;
}

.btn-editar {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-pagamento {
    background: #2980b9;
    color: #fff;
}

.btn-primario {
    background: #2980b9;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    margin-top: 6px;
}

.btn-sucesso {
    background: #27ae60;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
}

.btn-perigo {
    background: #e74c3c;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
}

.btn-cancelar {
    display: block;
    text-align: center;
    background: #ecf0f1;
    color: #555;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
    box-sizing: border-box;
}

label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    margin-top: 12px;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

.detalhes-servico {
    background: #f7f8fa;
    color: #555;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    white-space: pre-line;
}

.linha-cliente {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-icone {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: #ecf0f1;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.contato-cliente {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.acoes-icone {
    display: flex;
    gap: 8px;
}

.btn-icone-pagamento {
    background: #eaf2f8;
    color: #2980b9;
}

.btn-icone-info {
    background: #fef5e7;
    color: #b9770e;
    border: none;
    cursor: pointer;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.aberto {
    display: flex;
}

.modal-caixa {
    background: #fff;
    border-radius: 12px;
    padding: 22px 20px;
    max-width: 320px;
    width: 100%;
    position: relative;
}

.modal-caixa h3 {
    margin: 0 0 14px 0;
    color: #2c3e50;
    font-size: 17px;
    padding-right: 20px;
}

.modal-fechar {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
}

.modal-linha {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.modal-linha span:first-child {
    color: #888;
}

.info-linha {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.vazio {
    text-align: center;
    color: #888;
    padding: 40px 10px;
}

.login-box {
    max-width: 340px;
    margin: 60px auto;
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.erro {
    background: #fdecea;
    color: #c0392b;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.sucesso {
    background: #eafaf1;
    color: #1e8449;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.topo-titulo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.topo-titulo h2 {
    font-size: 18px;
    margin: 0;
    color: #2c3e50;
}

.resumo-total {
    background: #eaf2f8;
    color: #1a5276;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 12px;
}

.ordenacao {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 13px;
}

.ordenacao-label {
    color: #777;
}

.chip-ordenar {
    background: #fff;
    border: 1px solid #ddd;
    color: #444;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.chip-ordenar.ativo {
    background: #2980b9;
    border-color: #2980b9;
    color: #fff;
    font-weight: 600;
}
