* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "IBM Plex Sans", sans-serif;
}

header{
    text-align: center;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.12);
    padding: 15px;
    color: #29A797;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1{
    font-weight: 500;
    font-size: 25px;
}

.main-container{
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.fields{
    width: 100%;
    gap: 30px;
}

form{
    box-shadow: 0 1px 3px rgba(0,0,0,0.1),
                0 4px 6px rgba(0,0,0,0.08),
                0 -1px 3px rgba(0,0,0,0.05);
    padding: 25px 20px;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-control{
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.form-button{
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#submit-button{
    background-color: #29A797;
    color: white;
    border-radius: 5px;
    border-style: none;
    padding: 8px 5px;
    width: 100px;
    cursor: pointer;
    transition: all 0.3s;
}

#submit-button:hover{
    background-color: #1bd295;
}

#resultado {
    color: #29A797;
    font-weight: 600;
    text-align: start;
}

label{
    font-weight: 600;
    white-space: nowrap;
    margin-top: 10px;
}

input, select{
    border: 1px solid #BEBEBE;
    border-radius: 5px;
    padding: 4px;
}

.input-box {
  display: flex;
  align-items: center;
  border: 1px solid #29A797;
  border-radius: 4px;
  overflow: hidden;
}

select{
    background-color: white;
    border: 1px solid #29A797;
}

.prefix, .sufix{
    background-color: #29A797;
    color: #ffff;
    padding: 4px;
}

.sufix{
    padding-left: 5px;
}

.input-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
}

#valor-compra{
    width: 100px;
}

table, thead, tbody, th, td, tr {
    display: block;
}

thead {
    display: none;
}

tbody tr {
    background: white;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border: none;
}

td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
}

.texto{
    text-align: left;
}

.data{
    text-align: center;
}

#notif {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    display: none;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease;
}

#notif.error {
    background-color: #e64432;
}

#notif.success {
    background-color: #29a74f;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 560px){
   form {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: end;
        gap: 20px;
        max-width: 800px;
    }

    .fields {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .form-button{
        align-self: end;
    }

    .form-control {
        max-width: 150px;
    }

    header{
        justify-content: flex-start;
        padding-left: 20px;
    }
}

@media (min-width: 768px){
    table {
        display: table;
        margin-top: 50px;
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1),
                    0 4px 6px rgba(0,0,0,0.08);
        border-radius: 10px;
        border: 1px solid #ccc;
        overflow: hidden;
    }

    thead {
        display: table-header-group;
        background-color: #29A797;
        color: #fff;
    }

    tbody {
        display: table-row-group;
    }

    tr {
        display: table-row;
    }

    th, td {
        display: table-cell;
        padding: 14px 24px;
        text-align: right;
    }

    th.texto, td.texto {
        text-align: left;
    }

    th.data, td.data {
        text-align: center;
    }

    td::before {
        content: none;
    }

    tbody tr td {
        border-bottom: 1px solid #ebebeb;
    }

    tbody tr:last-child td {
        border-bottom: none;
    }

    th:hover{
        cursor: pointer;
        background-color: #1bd295;
    }
}

@media(min-width: 800px){
    form{
        max-width: none;
        width: 100%;
    }

    label{
        margin-top: 0;
    }
}