/* === Sistema de Avaliações - Bessa Imóveis === */

:root {
    --primary-color: #800020;
    --secondary-color: #A02040;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gray-color: #5a6268;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --white-color: #ffffff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark-color);
}

/* === Login === */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--white-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.login-logo {
    width: 80px;
    margin-bottom: 20px;
}

.login-card h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--gray-color);
    margin-bottom: 25px;
}

.login-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.login-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.login-option {
    flex: 1;
    min-width: 150px;
    padding: 25px 20px;
    border-radius: 15px;
    text-decoration: none;
    background: var(--light-color);
    color: var(--dark-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.login-option i {
    font-size: 2rem;
    color: var(--primary-color);
}

.login-option span {
    font-weight: 600;
}

.login-option small {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.login-option:hover {
    background: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

.login-option:hover i,
.login-option:hover small {
    color: var(--white-color);
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.radio-label:hover {
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    width: auto;
}

.radio-label input[type="radio"]:checked+span {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(128, 0, 32, 0.05);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
}

.form-actions .btn {
    flex: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(128, 0, 32, 0.3);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
}

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

.btn-small {
    padding: 8px 15px;
    font-size: 0.85rem;
    width: auto;
}

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

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

.btn-danger:hover {
    background: #c82333;
}

.btn-email {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: var(--white-color);
}

.btn-email:hover {
    background: linear-gradient(135deg, #0077b6, #005f8a);
    transform: scale(1.05);
}

.btn-disabled {
    background: #6c757d;
    color: var(--white-color);
    opacity: 0.5;
    cursor: not-allowed;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 120px;
}

/* Busca Global */
.global-search-container {
    margin-bottom: 25px;
}

.global-search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

.search-input-wrapper.global {
    flex: 1;
    position: relative;
}

.search-input-wrapper.global input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input-wrapper.global input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input-wrapper.global>i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    text-decoration: none;
}

.search-results-container {
    background: var(--white-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.search-results-container h2 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.results-count {
    color: #666;
    margin-bottom: 20px;
}

.empty-results {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-results i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.search-result-group {
    margin-bottom: 20px;
}

.search-result-group h3 {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
}

.result-item:hover .result-icon {
    background: rgba(255, 255, 255, 0.2);
}

.result-item:hover small {
    color: rgba(255, 255, 255, 0.8);
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
}

.result-info strong {
    display: block;
    margin-bottom: 3px;
}

.result-info small {
    color: #666;
}

.btn-logout {
    background: transparent;
    color: var(--white-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: 30px;
}

.login-footer a {
    color: var(--gray-color);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--primary-color);
}

/* === Alertas === */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

/* === Admin === */
.admin-container {
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 15px 0;
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--white-color);
}

.admin-logo img {
    height: 40px;
}

.admin-logo span {
    font-weight: 600;
    font-size: 1.1rem;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white-color);
}

.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* === Dashboard === */
.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-text h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.welcome-text p {
    color: var(--gray-color);
}

.welcome-actions .btn {
    width: auto;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--white-color);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.metric-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i {
    font-size: 1.8rem;
    color: var(--white-color);
}

.metric-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-info p {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.metric-info small {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--white-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3 i {
    color: var(--primary-color);
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Lists Grid */
.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.list-card {
    background: var(--white-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.list-card h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-card h3 i {
    color: var(--primary-color);
}

.list-card.warning-card h3 i {
    color: var(--warning-color);
}

.activity-list {
    list-style: none;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.activity-icon.particular {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.activity-icon.judicial {
    background: rgba(240, 147, 251, 0.1);
    color: #f093fb;
}

.activity-icon.cliente {
    background: rgba(128, 0, 32, 0.1);
    color: var(--primary-color);
}

.activity-icon.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-info strong {
    display: block;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-info small {
    color: var(--gray-color);
    font-size: 0.85rem;
}

.activity-date {
    font-size: 0.85rem;
    color: var(--gray-color);
    white-space: nowrap;
}

.success-message {
    color: var(--success-color) !important;
}

.success-message i {
    color: var(--success-color);
}

/* === Tabs === */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background: var(--white-color);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    border-color: var(--primary-color);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.admin-card {
    background: var(--white-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.admin-card.full-width {
    grid-column: 1 / -1;
}

.admin-card h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-form .form-group {
    margin-bottom: 15px;
}

.admin-form .form-group label {
    font-size: 0.9rem;
}

/* === Card Header with Search === */
.card-header-with-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.card-header-with-search h2 {
    margin-bottom: 0;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-input-wrapper input {
    padding: 10px 15px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    width: 100%;
    min-width: 250px;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* === Tabela === */
.table-responsive {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: var(--light-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td {
    font-size: 0.9rem;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

.badge {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
}

.badge-pj {
    background: var(--info-color);
}

.badge-orgao {
    background: #667eea;
}

.text-muted {
    color: var(--gray-color);
}

.empty-message {
    text-align: center;
    color: var(--gray-color);
    padding: 30px;
}

/* === Órgãos List === */
.orgaos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.orgao-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--light-color);
    border-radius: 10px;
    gap: 15px;
}

.orgao-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.orgao-info strong {
    font-size: 0.95rem;
}

/* === Laudos Grid === */
.laudos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.laudo-card {
    background: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.laudo-card .laudo-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.laudo-card h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.laudo-card small {
    color: var(--gray-color);
    display: block;
    margin-bottom: 15px;
}

.laudo-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white-color);
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-bottom: 10px;
}

.modal-warning {
    color: var(--danger-color);
    font-size: 0.9rem;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer .btn {
    width: auto;
}

/* === Cliente === */
.cliente-container {
    min-height: 100vh;
}

.cliente-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 15px 0;
}

.cliente-header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cliente-logo img {
    height: 40px;
}

.cliente-user {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--white-color);
}

.cliente-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cliente-welcome {
    text-align: center;
    margin-bottom: 40px;
}

.cliente-welcome h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cliente-welcome p {
    color: var(--gray-color);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white-color);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-color);
    margin-bottom: 25px;
}

.laudos-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.laudo-card-cliente {
    background: var(--white-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.laudo-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.laudo-icon-wrapper i {
    font-size: 2rem;
    color: var(--white-color);
}

.laudo-info {
    flex: 1;
    min-width: 200px;
}

.laudo-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.laudo-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.laudo-actions-cliente {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cliente-footer-info {
    margin-top: 40px;
    padding: 20px;
    background: rgba(128, 0, 32, 0.05);
    border-radius: 10px;
    text-align: center;
    color: var(--gray-color);
}

.cliente-footer-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* === Responsivo === */

/* Tablets e dispositivos médios */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

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

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

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .admin-table .actions {
        flex-direction: column;
        gap: 5px;
    }

    .laudo-card-cliente {
        flex-direction: column;
        text-align: center;
    }

    .laudo-actions-cliente {
        width: 100%;
        justify-content: center;
    }

    .cliente-header-content {
        flex-direction: column;
        gap: 15px;
    }

    .login-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-header-with-search {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        width: 100%;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-input-wrapper input {
        min-width: 100%;
    }

    .radio-group {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
    }

    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .dashboard-welcome {
        text-align: center;
        justify-content: center;
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
    }

    .welcome-text h1 {
        font-size: 1.4rem;
    }

    .metric-info h3 {
        font-size: 1.6rem;
    }

    .chart-container {
        height: 250px;
    }
}

/* Smartphones médios */
@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    /* Header Admin - Mobile Friendly */
    .admin-header {
        padding: 12px 0;
    }

    .admin-header-content {
        flex-direction: column;
        gap: 12px;
        padding: 0 15px;
    }

    .admin-logo {
        justify-content: center;
    }

    .admin-logo span {
        display: none;
    }

    .admin-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 0;
    }

    .nav-link {
        padding: 10px 8px;
        font-size: 0.75rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        flex-direction: column;
        gap: 4px;
    }

    .nav-link i {
        font-size: 1.1rem;
    }

    .btn-logout {
        grid-column: span 3;
        background: rgba(255, 255, 255, 0.15);
    }

    /* Dashboard Welcome */
    .dashboard-welcome {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .welcome-text h1 {
        font-size: 1.2rem;
    }

    .welcome-text p {
        font-size: 0.85rem;
    }

    .welcome-actions .btn {
        width: 100%;
    }

    /* Metrics */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .metric-card {
        padding: 18px;
        flex-direction: row;
        text-align: left;
        gap: 15px;
    }

    .metric-icon {
        width: 55px;
        height: 55px;
    }

    .metric-icon i {
        font-size: 1.4rem;
    }

    .metric-info h3 {
        font-size: 1.4rem;
    }

    .metric-info p {
        font-size: 0.85rem;
    }

    .metric-info small {
        font-size: 0.75rem;
    }

    /* Charts */
    .charts-grid {
        gap: 15px;
    }

    .chart-card {
        padding: 15px;
        border-radius: 15px;
    }

    .chart-card h3 {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .chart-container {
        height: 200px;
    }

    /* Lists */
    .lists-grid {
        gap: 15px;
    }

    .list-card {
        padding: 15px;
        border-radius: 15px;
    }

    .list-card h3 {
        font-size: 0.95rem;
    }

    .activity-list li {
        padding: 10px 0;
    }

    .activity-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .activity-info strong {
        font-size: 0.85rem;
    }

    .activity-info small {
        font-size: 0.75rem;
    }

    .activity-date {
        font-size: 0.75rem;
    }

    /* Admin Cards */
    .admin-card {
        padding: 18px;
        border-radius: 12px;
    }

    .admin-card h2 {
        font-size: 1rem;
    }

    /* Tables */
    .table-responsive {
        margin: 0 -18px;
        padding: 0 18px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    /* Tabs */
    .admin-tabs {
        gap: 6px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    /* Forms */
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    /* Global Search */
    .global-search-form {
        flex-direction: column;
    }

    .global-search-form .btn {
        width: 100%;
    }

    /* Admin Main */
    .admin-main {
        padding: 20px 15px;
    }

    /* Orgaos */
    .orgao-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .orgao-item .btn {
        width: 100%;
    }
}

/* Smartphones pequenos (iPhone SE, etc) */
@media (max-width: 480px) {
    /* Login - Opções em coluna única com layout horizontal */
    .login-card {
        padding: 25px 20px;
        border-radius: 15px;
        margin: 10px;
    }

    .login-logo {
        width: 60px;
        margin-bottom: 15px;
    }

    .login-card h1 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .login-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .login-options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .login-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 16px 20px;
        gap: 15px;
        text-align: left;
        min-height: 65px;
    }

    .login-option i {
        font-size: 1.6rem;
        width: 40px;
        flex-shrink: 0;
    }

    .login-option span {
        font-size: 1rem;
    }

    .login-option small {
        font-size: 0.75rem;
    }

    .admin-option {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 2px solid var(--primary-color);
    }

    .admin-option i {
        color: var(--primary-color);
    }

    /* Login Form */
    .login-form .form-group {
        margin-bottom: 15px;
    }

    .btn-primary {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .back-link {
        margin-top: 15px;
        font-size: 0.9rem;
    }

    .login-footer {
        margin-top: 20px;
    }

    /* Header ainda mais compacto */
    .admin-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-logout {
        grid-column: span 2;
    }

    /* Dashboard */
    .welcome-text h1 {
        font-size: 1.1rem;
    }

    /* Metric ainda mais compacto */
    .metric-card {
        padding: 15px;
    }

    .metric-icon {
        width: 48px;
        height: 48px;
    }

    .metric-icon i {
        font-size: 1.2rem;
    }

    .metric-info h3 {
        font-size: 1.2rem;
    }

    .metric-info p {
        font-size: 0.8rem;
    }

    /* Tabs compactas */
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .tab-btn i {
        display: none;
    }

    /* Admin Cards */
    .admin-card {
        padding: 15px;
    }

    .admin-card h2 {
        font-size: 0.95rem;
    }

    /* Charts */
    .chart-container {
        height: 180px;
    }

    /* Activity List */
    .activity-list li {
        flex-wrap: wrap;
    }

    .activity-date {
        width: 100%;
        text-align: left;
        margin-top: 5px;
        padding-left: 50px;
    }

    /* Buttons */
    .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Cliente Area */
    .cliente-main {
        padding: 20px 15px;
    }

    .cliente-welcome h1 {
        font-size: 1.3rem;
    }

    .cliente-welcome p {
        font-size: 0.85rem;
    }

    .laudo-card-cliente {
        padding: 18px;
    }

    .laudo-icon-wrapper {
        width: 55px;
        height: 55px;
    }

    .laudo-icon-wrapper i {
        font-size: 1.5rem;
    }

    .laudo-info h3 {
        font-size: 1rem;
    }

    .laudo-actions-cliente .btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .empty-state {
        padding: 40px 15px;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h2 {
        font-size: 1.1rem;
    }

    .cliente-footer-info {
        padding: 15px;
        font-size: 0.85rem;
    }

    /* Proposta Container */
    .proposta-container {
        padding: 20px 15px;
    }
}

/* Touch-friendly: garante altura mínima em elementos clicáveis */
@media (hover: none) and (pointer: coarse) {
    .login-option,
    .btn,
    .tab-btn,
    .nav-link {
        min-height: 44px;
    }
    
    .btn-small {
        min-height: 36px;
    }
    
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Evita zoom no iOS */
    }
}