

/* =========================================================
   RESET
========================================================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#f4f7f9;
    color:#17212b;
}

/* =========================================================
   VARIÁVEIS
========================================================= */

:root{
    --primary:#159a68;
    --primary-dark:#08744c;
    --primary-light:#e5f7ef;

    --dark:#102a43;
    --dark-2:#173b59;

    --white:#ffffff;

    --text:#17212b;
    --muted:#71808c;

    --border:#e1e8ed;

    --warning:#f0ad00;
    --warning-bg:#fff4d9;

    --danger:#d64545;
    --danger-bg:#fdecec;

    --blue:#2878c8;
    --blue-bg:#eaf3fc;

    --shadow:0 3px 15px rgba(16,42,67,.08);
}

/* =========================================================
   APP
========================================================= */

.app{
    min-height:100vh;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;

    width:250px;

    background:var(--dark);
    color:white;

    padding:22px 14px;

    z-index:100;

    overflow-y:auto;
}

.logo{
    padding:8px 12px 30px;
}

.logo h1{
    font-size:24px;
}

.logo h1 span{
    color:#56c596;
}

.logo small{
    display:block;
    margin-top:5px;
    color:#9fb4c5;
}

/* MENU */

.menu{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.menu button{
    width:100%;
    border:none;
    background:transparent;

    color:#d9e5ef;

    text-align:left;

    padding:13px 14px;

    border-radius:10px;

    cursor:pointer;

    font-size:14px;

    transition:.2s;
}

.menu button:hover{
    background:var(--dark-2);
    color:white;
}

.menu button.active{
    background:#1d4566;
    color:white;
}

.menu-icon{
    width:25px;
    display:inline-block;
}

/* =========================================================
   MAIN
========================================================= */

.main{
    margin-left:250px;
    min-height:100vh;
    padding:25px;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-bottom:25px;
}

.top-title small{
    color:var(--muted);
}

.top-title h2{
    margin-top:5px;
    font-size:27px;
}

.top-actions{
    display:flex;
    gap:10px;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn{
    border:none;
    border-radius:9px;

    padding:11px 16px;

    font-weight:bold;

    cursor:pointer;

    transition:.2s;
}

.btn-primary{
    background:var(--primary);
    color:white;
}

.btn-primary:hover{
    background:var(--primary-dark);
}

.btn-secondary{
    background:#e8eef2;
    color:#20313f;
}

.btn-secondary:hover{
    background:#dce5ea;
}

.btn-danger{
    background:var(--danger);
    color:white;
}

.btn-small{
    padding:7px 10px;
    font-size:12px;
}

/* =========================================================
   VIEWS
========================================================= */

.view{
    display:none;
}

.view.active{
    display:block;
}

/* =========================================================
   CARDS
========================================================= */

.card{
    background:white;

    border-radius:14px;

    padding:20px;

    box-shadow:var(--shadow);
}

.section{
    margin-top:20px;
}

.section-title{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-bottom:15px;
}

.section-title h3{
    font-size:18px;
}

/* =========================================================
   METRICS
========================================================= */

.metrics{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}

.metric{
    background:white;

    border-radius:14px;

    padding:20px;

    box-shadow:var(--shadow);
}

.metric-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.metric-icon{
    width:40px;
    height:40px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:var(--primary-light);

    border-radius:10px;

    font-size:20px;
}

.metric-number{
    font-size:30px;
    font-weight:800;

    margin-top:12px;
}

.metric-label{
    color:var(--muted);
    font-size:13px;
}

/* =========================================================
   TABLE
========================================================= */

.table-wrapper{
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th,
td{
    padding:13px 10px;

    border-bottom:1px solid #edf1f4;

    text-align:left;

    font-size:14px;
}

th{
    color:#64727e;
    font-size:12px;
    text-transform:uppercase;
}

tbody tr:hover{
    background:#fafcfd;
}

/* =========================================================
   BADGES
========================================================= */

.badge{
    display:inline-block;

    padding:5px 9px;

    border-radius:20px;

    font-size:11px;

    font-weight:bold;

    background:var(--primary-light);
    color:var(--primary-dark);
}

.badge-warning{
    background:var(--warning-bg);
    color:#8b6200;
}

.badge-danger{
    background:var(--danger-bg);
    color:#a82e2e;
}

.badge-blue{
    background:var(--blue-bg);
    color:#21629e;
}

.badge-gray{
    background:#e9eef2;
    color:#5c6974;
}

/* =========================================================
   PROGRESS
========================================================= */

.progress-area{
    min-width:150px;
}

.progress-info{
    display:flex;
    justify-content:space-between;

    font-size:12px;

    margin-bottom:6px;
}

.progress{
    height:8px;

    background:#e8eef1;

    border-radius:20px;

    overflow:hidden;
}

.progress-bar{
    height:100%;

    background:var(--primary);

    border-radius:20px;

    transition:.3s;
}

/* =========================================================
   SEARCH
========================================================= */

.search-box{
    position:relative;
}

.search-box input{
    width:100%;

    padding:13px 14px;

    border:1px solid var(--border);

    border-radius:9px;

    outline:none;
}

.search-box input:focus{
    border-color:var(--primary);
}

/* =========================================================
   GRID
========================================================= */

.two-columns{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

/* =========================================================
   PATIENT PROFILE
========================================================= */

.patient-header{
    display:flex;
    align-items:center;
    gap:15px;
}

.avatar{
    width:55px;
    height:55px;

    border-radius:50%;

    background:var(--primary-light);

    color:var(--primary-dark);

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:20px;
    font-weight:bold;
}

.patient-name{
    font-size:20px;
    font-weight:bold;
}

.patient-info{
    color:var(--muted);
    font-size:13px;
    margin-top:5px;
}

/* =========================================================
   TIMELINE
========================================================= */

.timeline{
    border-left:3px solid #bde8d5;

    padding-left:20px;

    margin-top:15px;
}

.timeline-item{
    position:relative;

    margin-bottom:22px;
}

.timeline-item::before{
    content:"";

    position:absolute;

    left:-28px;
    top:2px;

    width:10px;
    height:10px;

    background:var(--primary);

    border-radius:50%;
}

.timeline-date{
    color:var(--muted);

    font-size:12px;

    margin-bottom:5px;
}

.timeline-title{
    font-weight:bold;

    margin-bottom:5px;
}

.timeline-text{
    color:#52616d;

    font-size:13px;

    line-height:1.5;
}

/* =========================================================
   AGENDA
========================================================= */

.agenda-day{
    margin-bottom:20px;
}

.agenda-date{
    font-weight:bold;

    margin-bottom:10px;
}

.agenda-item{
    display:flex;

    align-items:center;

    gap:15px;

    padding:13px;

    border:1px solid var(--border);

    border-radius:10px;

    margin-bottom:8px;
}

.agenda-time{
    font-weight:bold;

    width:60px;
}

.agenda-patient{
    flex:1;
}

.agenda-patient strong{
    display:block;
}

.agenda-patient small{
    color:var(--muted);
}

/* =========================================================
   EMPTY
========================================================= */

.empty{
    text-align:center;

    padding:35px 20px;

    color:var(--muted);
}

.empty-icon{
    font-size:35px;

    margin-bottom:10px;
}

/* =========================================================
   MODAL
========================================================= */

.modal{
    position:fixed;

    inset:0;

    background:rgba(16,42,67,.65);

    display:none;

    align-items:center;
    justify-content:center;

    padding:20px;

    z-index:500;
}

.modal.show{
    display:flex;
}

.modal-box{
    background:white;

    width:min(850px,100%);

    max-height:90vh;

    overflow-y:auto;

    border-radius:16px;

    padding:24px;
}

.modal-header{
    display:flex;

    justify-content:space-between;
    align-items:center;

    margin-bottom:20px;
}

.modal-header h3{
    font-size:20px;
}

.close{
    border:none;

    background:#edf2f5;

    width:35px;
    height:35px;

    border-radius:50%;

    cursor:pointer;

    font-size:18px;
}

/* =========================================================
   FORM
========================================================= */

.form-grid{
    display:grid;

    grid-template-columns:1fr 1fr;

    gap:14px;
}

.form-field{
    display:flex;

    flex-direction:column;

    gap:6px;
}

.form-field.full{
    grid-column:1/-1;
}

.form-field label{
    font-size:13px;

    font-weight:bold;
}

.form-field input,
.form-field select,
.form-field textarea{
    width:100%;

    padding:10px 11px;

    border:1px solid #d5e0e6;

    border-radius:8px;

    outline:none;

    background:white;
}

.form-field textarea{
    min-height:100px;

    resize:vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{
    border-color:var(--primary);
}

.modal-footer{
    display:flex;

    justify-content:flex-end;

    gap:10px;

    margin-top:20px;
}

/* =========================================================
   ALERT
========================================================= */

.alert-box{
    padding:13px;

    border-radius:10px;

    margin-bottom:8px;

    background:#f7fafb;

    border-left:4px solid var(--primary);
}

.alert-box.warning{
    border-color:var(--warning);
}

.alert-box.danger{
    border-color:var(--danger);
}

.alert-box strong{
    display:block;

    margin-bottom:4px;
}

.alert-box small{
    color:var(--muted);
}

/* =========================================================
   MOBILE
========================================================= */

.mobile-menu{
    display:none;

    background:var(--dark);

    color:white;

    border:none;

    padding:10px 14px;

    border-radius:8px;

    margin-bottom:15px;
}

@media(max-width:1000px){

    .metrics{
        grid-template-columns:1fr 1fr;
    }

}

@media(max-width:750px){

    .sidebar{
        width:220px;

        transform:translateX(-100%);

        transition:.25s;
    }

    .sidebar.open{
        transform:translateX(0);
    }

    .main{
        margin-left:0;

        padding:15px;
    }

    .mobile-menu{
        display:block;
    }

    .topbar{
        align-items:flex-start;

        gap:10px;
    }

    .top-actions .btn-secondary{
        display:none;
    }

    .two-columns{
        grid-template-columns:1fr;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .form-field.full{
        grid-column:auto;
    }

}

@media(max-width:500px){

    .metrics{
        grid-template-columns:1fr;
    }

    .topbar{
        flex-direction:column;
    }

    .top-actions{
        width:100%;
    }

    .top-actions .btn-primary{
        width:100%;
    }

}

/* =====================================================
   MODAL PAGAMENTO
===================================================== */

.modal-fisio {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.55);

    z-index: 9999;

    align-items: center;

    justify-content: center;

    padding: 20px;
}


.modal-fisio.ativo {
    display: flex;
}


.modal-fisio-conteudo {

    width: 100%;

    max-width: 520px;

    max-height: 90vh;

    overflow-y: auto;

    background: #fff;

    border-radius: 18px;

    padding: 24px;

    box-shadow: 0 20px 60px rgba(0,0,0,.25);

}


.modal-fisio-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 20px;

}


.modal-fisio-header h2 {

    margin: 0 0 5px;

}


.modal-fisio-header p {

    margin: 0;

    color: #777;

}


.fechar-modal-fisio {

    border: 0;

    background: transparent;

    font-size: 30px;

    cursor: pointer;

    line-height: 1;

}


.pagamento-resumo {

    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 10px;

    margin-bottom: 22px;

}


.pagamento-resumo > div {

    background: #f5f6f8;

    border-radius: 12px;

    padding: 12px;

}


.pagamento-resumo span {

    display: block;

    font-size: 12px;

    color: #777;

    margin-bottom: 5px;

}


.pagamento-resumo strong {

    font-size: 17px;

}


.campo-fisio {

    margin-bottom: 16px;

}


.campo-fisio label {

    display: block;

    font-weight: 600;

    margin-bottom: 7px;

}


.campo-fisio input,
.campo-fisio select,
.campo-fisio textarea {

    width: 100%;

    box-sizing: border-box;

    padding: 12px;

    border: 1px solid #ddd;

    border-radius: 10px;

    font-size: 15px;

    outline: none;

}


.campo-fisio input:focus,
.campo-fisio select:focus,
.campo-fisio textarea:focus {

    border-color: #555;

}


.btn-confirmar-pagamento {

    width: 100%;

    border: 0;

    padding: 14px;

    border-radius: 11px;

    cursor: pointer;

    font-size: 15px;

    font-weight: 700;

    background: #111;

    color: white;

}


.historico-pagamentos {

    margin-top: 28px;

    border-top: 1px solid #eee;

    padding-top: 20px;

}


.historico-pagamentos h3 {

    margin-top: 0;

}


.pagamento-item {

    display: flex;

    justify-content: space-between;

    gap: 10px;

    padding: 13px 0;

    border-bottom: 1px solid #eee;

}


.pagamento-item-info strong {

    display: block;

}


.pagamento-item-info small {

    color: #777;

}


.pagamento-item-valor {

    font-weight: 700;

    white-space: nowrap;

}


.pagamentos-vazio {

    color: #888;

    font-size: 14px;

}


@media(max-width:600px) {

    .pagamento-resumo {

        grid-template-columns: 1fr;

    }

    .modal-fisio-conteudo {

        padding: 18px;

    }

}

  

