/* style.css - Estilos do Atendimento Farmacêutico */

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a, #1a3a6b);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== LOGIN ===== */
.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 3rem;
    color: #1a3a6b;
}

.logo h1 {
    color: #1a3a6b;
    font-size: 1.5rem;
    margin-top: 10px;
}

.logo p {
    color: #666;
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group label i {
    color: #1a3a6b;
    width: 20px;
}

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a3a6b;
}

.senha-wrapper {
    position: relative;
}

.senha-wrapper input {
    padding-right: 45px;
}

.toggle-senha {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1.1rem;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a3a6b, #2a5a9b);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 58, 107, 0.3);
}

.btn-primary {
    background: #1a3a6b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #2a5a9b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #64748b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.login-msg {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
}

.login-msg.error {
    color: #dc2626;
}

.login-msg.success {
    color: #16a34a;
}

.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link a {
    color: #1a3a6b;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ===== DASHBOARD ===== */
.dashboard {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.header {
    background: white;
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.3rem;
    color: #1a3a6b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 i {
    color: #1a3a6b;
}

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

.header-info .badge {
    background: #1a3a6b;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a3a6b;
}

.stat-card .label {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 10px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover {
    border-color: #1a3a6b;
    color: #1a3a6b;
}

.tab-btn.active {
    background: #1a3a6b;
    color: white;
    border-color: #1a3a6b;
}

.tab-content {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: #f1f5f9;
    color: #1a3a6b;
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
}

td {
    padding: 10px 15px;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover td {
    background: #f8fafc;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box h2 {
    color: #1a3a6b;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-box .close-modal {
    cursor: pointer;
    color: #dc2626;
    font-size: 1.5rem;
}

.modal-box .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .modal-box .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a3a6b;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    font-weight: 600;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #dc2626;
}

.toast.success {
    background: #16a34a;
}