/* Variáveis de Cores BioCare */
:root {
    --primary-color: #1b8b8a;
    --secondary-color: #7ab547;
    --text-dark: #4a4a4a;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --info-color: #3b82f6;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2f1 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
}

.logo {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Card */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

/* Form */
.form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(27, 139, 138, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 2px solid #93c5fd;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 2px solid #fcd34d;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 2px solid #fca5a5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(27, 139, 138, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

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

.btn-success:hover {
    background: #059669;
}

.btn-icon {
    font-size: 1.3rem;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.admin-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: var(--secondary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
}

.modal-icon.success {
    background-color: #d1fae5;
    color: var(--success-color);
}

.modal-icon.error {
    background-color: #fee2e2;
    color: var(--error-color);
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.modal-detail {
    font-weight: 600;
    color: var(--text-dark);
}

.modal-content .btn {
    margin-top: 20px;
    width: auto;
    min-width: 150px;
}

/* Admin Page Styles */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.admin-header h1 {
    color: var(--white);
    margin-bottom: 10px;
}

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

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
}

.filters {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.table-container {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

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

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

th {
    padding: 18px 15px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
}

td {
    padding: 18px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
}

tbody tr:hover {
    background-color: var(--bg-light);
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-pendente {
    background-color: #fef3c7;
    color: #92400e;
}

.status-concluido {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelado {
    background-color: #fee2e2;
    color: #991b1b;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.file-upload-section {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.file-input-wrapper {
    margin-bottom: 15px;
}

.file-input-wrapper input[type="file"] {
    display: block;
    margin-bottom: 10px;
}

.file-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

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

.login-box .logo {
    width: 180px;
    margin-bottom: 25px;
}

.login-box h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-box .subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Documentos Padrão Section */
.documentos-section {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.documentos-section h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: var(--bg-light);
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0fffe;
}

.upload-area.dragover {
    border-color: var(--secondary-color);
    background: #f0f9f0;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.documentos-list {
    display: grid;
    gap: 15px;
}

.documento-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.documento-item:hover {
    border-color: var(--primary-color);
    background: #f0fffe;
}

.documento-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.documento-icon {
    font-size: 2rem;
}

.documento-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.documento-details p {
    font-size: 0.9rem;
    color: var(--text-light);
}

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

.btn-icon-only {
    padding: 10px 15px;
    font-size: 1.2rem;
    width: auto;
    min-width: auto;
}

.upload-documento-section {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.file-preview {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid var(--border-color);
}

.file-preview-icon {
    font-size: 2.5rem;
}

.file-preview-info {
    flex: 1;
}

.file-preview-info strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.file-preview-info small {
    color: var(--text-light);
}

.btn-remove-file {
    background: var(--error-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-remove-file:hover {
    background: #dc2626;
}

/* Status Banner */
.status-banner {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
}

.status-banner.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #6ee7b7;
}

.status-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.status-banner-content span:first-child {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.btn-banner {
    padding: 8px 20px;
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-banner:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Loading Spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Template Boxes */
.template-box {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.template-box:hover {
    border-color: var(--secondary-color);
    background: #f0f9f0;
}

.template-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.template-box textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-variavel {
    background: var(--white);
    border: 2px solid #fbbf24;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-variavel:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    transform: translateY(-2px);
}

.btn-variavel code {
    background: #fed7aa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #92400e;
}

/* Config Boxes */
.config-box {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.config-box:hover {
    border-color: var(--primary-color);
    background: #f0fffe;
}

.config-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.config-box .form-group:last-child {
    margin-bottom: 0;
}

.status-message {
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Estilos para Datas Bloqueadas */
.data-bloqueada-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.data-bloqueada-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.data-bloqueada-passada {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    opacity: 0.7;
}

.btn-remover-bloqueio {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remover-bloqueio:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Checkbox customizado */
input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Select customizado */
select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    width: 100%;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .card {
        padding: 25px;
    }

    .logo {
        width: 150px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

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

    .filters-row {
        grid-template-columns: 1fr;
    }

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

    table {
        min-width: 800px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }

    /* Calendário em mobile */
    #calendario > div {
        min-height: 50px !important;
        padding: 8px 5px !important;
        font-size: 0.85rem !important;
    }
    
    #calendario > div > div:first-child {
        font-size: 1rem !important;
    }
    
    #calendario > div > div:last-child {
        font-size: 0.65rem !important;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }

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

    .modal-content {
        padding: 30px 20px;
    }
}
