/* Squinner Dashboard Styles */
:root {
    --sq-primary: #00b4b4;
    --sq-primary-hover: #009999;
    --sq-secondary: #ff8c00;
    --sq-bg: #eef3f3;
    --sq-sidebar-bg: #ffffff;
    --sq-text-dark: #2c3e50;
    --sq-text-light: #7f8c8d;
    --sq-border: #e0e6ed;
    --sq-card-bg: #ffffff;
}

.sq-dashboard-wrapper {
    display: flex;
    min-height: 80vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--sq-bg);
    color: var(--sq-text-dark);
    /* margin: -20px; */ /* Uncomment if needed to fill WP admin entirely */
}

/* Sidebar */
.sq-sidebar {
    width: 260px;
    flex: 0 0 260px;
    background-color: white;
    border-right: 1px solid var(--sq-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
    position: relative;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), flex-basis 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

/* Minimized Sidebar State */
.sq-sidebar.minimized {
    width: 80px;
    flex-basis: 80px;
    padding: 2rem 0.75rem;
}

/* Hover expansion when minimized */
.sq-sidebar.minimized:hover {
    width: 260px;
    flex-basis: 260px;
    padding: 2rem 1.5rem;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
}

/* Hide texts when strictly minimized (and not hovered) */
.sq-sidebar.minimized:not(:hover) .sq-logo-text,
.sq-sidebar.minimized:not(:hover) .sq-sidebar-section h4,
.sq-sidebar.minimized:not(:hover) .prof-name,
.sq-sidebar.minimized:not(:hover) .sq-btn-text,
.sq-sidebar.minimized:not(:hover) .sq-user-name,
.sq-sidebar.minimized:not(:hover) .sq-logout-link,
.sq-sidebar.minimized:not(:hover) #sq-profissionais-list li::after,
.sq-sidebar.minimized:not(:hover) #sq-arquivados-list li::after {
    display: none;
}

.sq-sidebar.minimized:not(:hover) .sq-logo {
    flex-direction: column-reverse !important;
    gap: 1.5rem !important;
    justify-content: center !important;
    align-items: center !important;
}

.sq-sidebar-top {
    display: flex;
    flex-direction: column;
}

.sq-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.sq-logo-mark {
    background-color: var(--sq-primary);
    color: #ffffff;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    /* A propriedade moderna para curvatura mais suave (squircle) que os navegadores estão adotando aos poucos, 
       mas no CSS puro a técnica mais usada para "squircle" verdadeiro é com border-radius grande + padding ou clip-path. 
       Aqui usaremos border-radius alto em proporção ao tamanho para dar aquele aspecto de "sabonete" (squircle). */
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 180, 180, 0.2);
}

.sq-logo a:hover .sq-logo-mark {
    background-color: var(--sq-primary-hover);
}

.sq-sidebar-section h4 {
    font-size: 0.75rem;
    color: var(--sq-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

#sq-profissionais-list, #sq-arquivados-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

#sq-profissionais-list li, #sq-arquivados-list li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--sq-text-light);
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sq-sidebar.minimized:not(:hover) #sq-profissionais-list li,
.sq-sidebar.minimized:not(:hover) #sq-arquivados-list li {
    justify-content: center;
    padding: 0.75rem 0;
}

#sq-profissionais-list li:hover,
#sq-profissionais-list li.active,
#sq-arquivados-list li:hover,
#sq-arquivados-list li.active {
    background-color: #f0f7f7;
    color: var(--sq-primary);
    font-weight: 500;
}

#sq-profissionais-list li::after,
#sq-arquivados-list li::after {
    content: "→";
    opacity: 0;
    transition: opacity 0.2s;
    font-weight: bold;
}

#sq-profissionais-list li:hover::after,
#sq-profissionais-list li.active::after,
#sq-arquivados-list li:hover::after,
#sq-arquivados-list li.active::after {
    opacity: 1;
}

.sq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.sq-btn-outline {
    background-color: transparent;
    border: 1px dashed var(--sq-primary);
    color: var(--sq-primary);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.sq-sidebar.minimized:not(:hover) .sq-btn-outline {
    padding: 0.85rem 0;
}

.sq-btn-outline:hover {
    background-color: #f0f7f7;
    border-style: solid;
}

.sq-btn-primary {
    background-color: var(--sq-primary);
    color: white;
}

.sq-btn-primary:hover {
    background-color: var(--sq-primary-hover);
}

.sq-btn-cancel {
    background-color: transparent;
    color: var(--sq-text-light);
    border: 1px solid var(--sq-border);
}

.sq-btn-cancel:hover {
    background-color: #f5f5f5;
}

/* Main Content */
.sq-main {
    flex: 1;
    padding: 2.5rem 3rem;
    overflow-y: auto;
}

.sq-view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.sq-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sq-header {
    margin-bottom: 3.5rem;
}

.sq-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--sq-text-dark);
}

.sq-header p {
    color: var(--sq-text-light);
    font-size: 1.1rem;
    margin: 0;
}

/* Cards */
.sq-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.sq-card {
    background: var(--sq-card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.05); /* very soft border */
}

.sq-card-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: #e0f7f7;
    color: var(--sq-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sq-card-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.sq-card-info {
    display: flex;
    flex-direction: column;
}

.sq-card-label {
    font-size: 0.8rem;
    color: var(--sq-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sq-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--sq-text-dark);
    line-height: 1;
}

.sq-card-sub {
    font-size: 0.75rem;
    color: var(--sq-secondary);
    font-weight: 700;
    margin-top: 0.75rem;
    border: 1px solid var(--sq-secondary);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    display: inline-block;
    width: fit-content;
}

/* Forms */
.sq-form-container {
    background: var(--sq-card-bg);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 600px;
}

.sq-form-group {
    margin-bottom: 0.75rem;
}

.sq-form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sq-text-light);
    text-transform: uppercase;
} /* slate-500 from the design for uppercase labels */

.sq-input, .sq-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--sq-border);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--sq-text-dark);
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    height: 38px;
}

.sq-input:focus {
    outline: none;
    border-color: var(--sq-primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 180, 0.1);
    background-color: #fff;
}

.sq-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Tables */
.sq-table-responsive {
    background: var(--sq-card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.sq-table {
    width: 100%;
    border-collapse: collapse;
}

.sq-table th, .sq-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--sq-border);
}

.sq-table th {
    background-color: #fafbfc;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--sq-text-light);
    text-transform: uppercase;
}

.sq-table td {
    font-size: 0.95rem;
}

.sq-table tbody tr:hover {
    background-color: #fcfcfc;
}

.sq-table tbody tr:last-child td {
    border-bottom: none;
}

/* Modals */
.sq-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* dim background */
    align-items: center;
    justify-content: center;
}

.sq-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-in-out;
}

.sq-modal-content {
    background-color: #fff;
    margin: auto;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    box-sizing: border-box;
    padding: 0;
}

.sq-modal-lg .sq-modal-content {
    max-width: 800px;
}

/* Modal Headers */
.sq-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--sq-border);
}

.sq-modal-header-title {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #1a202c;
    gap: 0.5rem;
    text-transform: uppercase;
}

.sq-modal-header-title span.dashicons {
    color: var(--sq-primary);
}

.sq-modal-header-title span.sq-modal-title {
    margin: 0;
    font-size: 1rem;
}

.sq-modal-close {
    background-color: #1a202c;
    color: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    line-height: 1;
    padding: 0;
}

.sq-modal-close:hover {
    background-color: #2d3748;
}

/* Modal Body/Footer */
.sq-modal-body {
    padding: 1rem 1.5rem;
}

.sq-modal-footer {
    padding: 1.5rem;
    background-color: #f8fafc;
    text-align: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Recibo Specific Styles */
.sq-recibo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.sq-recibo-title-group h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #1a202c;
    font-weight: 800;
}

.sq-recibo-subtitle {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sq-recibo-valor-box {
    text-align: right;
}

.sq-recibo-valor-texto {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a202c;
    margin-top: 0.5rem;
}

.sq-recibo-divider {
    border: 0;
    border-top: 2px solid #1a202c;
    margin-bottom: 2.5rem;
}

.sq-recibo-text {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.sq-recibo-signature-date {
    text-align: right;
    font-style: italic;
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 5rem;
}

.sq-recibo-signature-box {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.sq-recibo-signature-line {
    border-top: 1px solid #cbd5e0;
    width: 60%;
    margin: 0 auto 0.5rem auto;
}

.sq-recibo-prof-name {
    font-weight: 800;
    color: #1a202c;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.sq-recibo-prof-crp {
    color: #718096;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Professional Details View Specifics */
.sq-prof-topbar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0 1rem 0;
}

.sq-prof-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d3748;
    font-size: 1.05rem;
}

.sq-prof-info .dashicons {
    color: #2d3748;
}

.sq-prof-finance {
    color: #718096;
    font-size: 1rem;
}

.sq-prof-repasse {
    color: #718096;
}

.sq-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.sq-toolbar-left, .sq-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sq-input-search, .sq-select-filter {
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: #fafbfc;
    min-width: 200px;
}

.sq-input-search:focus, .sq-select-filter:focus {
    outline: none;
    border-color: var(--sq-primary);
}

/* Modal form grid layout */
.sq-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sq-form-row .sq-form-group {
    flex: 1;
    margin-bottom: 0;
}

.sq-form-group.full-width {
    width: 100%;
}

.sq-radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 38px; /* match input height roughly */
}

.sq-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: normal;
    text-transform: none;
    color: var(--sq-text-dark);
    margin: 0;
    cursor: pointer;
}

.sq-table td .dashicons {
    cursor: pointer;
    color: var(--sq-text-light);
    transition: color 0.2s;
    margin-right: 0.5rem;
}
.sq-table td .dashicons:hover {
    color: var(--sq-primary);
}
.sq-table td .dashicons-trash:hover {
    color: #e53e3e; /* red */
}


/* badges financeiras */
.sq-prof-info { display: flex; align-items: center; font-size: 1.1rem; color: var(--sq-text-dark); }
.sq-prof-info .dashicons { margin-right: 0.5rem; color: var(--sq-primary); }
.sq-prof-finance { display: flex; align-items: center; gap: 1rem; }
.sq-badge { display: flex; align-items: center; padding: 0.5rem 0.8rem; border-radius: 6px; font-size: 0.85rem; font-weight: 500; }
.sq-badge-light { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.sq-badge-success { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.sq-badge-label { margin-right: 0.5rem; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; opacity: 0.8; }
.sq-badge-value { font-weight: 700; font-size: 1rem; }

textarea#laudo-observacao {
    min-height: 100px;
}