/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.3rem 1.5rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo-rastreio {
    max-width: 150px;
    height: auto;
}

.header h1 {
    color: #667eea;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.brand-info .developer {
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}

.brand-info .website {
    font-size: 0.65rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.brand-info .website:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.user-info span {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.user-plan {
    font-size: 0.75rem;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.btn-config {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.3s ease;
}

.btn-config:hover {
    background: #4b5563;
}

.btn-logout {
    background: #ff4757;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

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

.btn-download-apk {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.btn-download-apk:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Sidebar Actions */
.sidebar-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-actions h3 {
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sidebar-buttons button {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.sidebar-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Botão de Suporte mais bonito */
.btn-support-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-support-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.children-list h3,
.quick-actions h3 {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.children-container {
    margin-bottom: 1.5rem;
}

.child-item {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.child-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.child-item.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.child-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.child-item p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.child-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ed573;
}

.child-status.offline {
    background: #ff4757;
}

.btn-add {
    width: 100%;
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Notifications */
.notifications-container {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.notification-item.urgent {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.notification-item.info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

/* Map Section */
.map-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.map-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-header h2 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.map-controls {
    display: flex;
    gap: 0.8rem;
}

.btn-control {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-control:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.map-container {
    height: 500px;
    position: relative;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 1.2rem;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* Aviso sobre precisão */
.precision-notice {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
    font-style: italic;
    border-left: 3px solid #667eea;
}

.precision-notice i {
    color: #667eea;
    font-size: 12px;
}

/* Location Info */
.location-info {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.info-header h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-item .label {
    font-weight: 500;
    color: #666;
}

.info-item .value {
    font-weight: 600;
    color: #333;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f3f4;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-save {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #5a6fd8;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Estilos para os novos modais */
.modal-large {
    max-width: 90vw;
    width: 90vw;
    max-height: 90vh;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

/* Apps List */
.apps-list {
    margin-top: 1rem;
}

.app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #667eea;
}

.app-item .app-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-item .app-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.app-item .app-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #374151;
}

.app-item .app-details p {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.app-item .app-usage {
    text-align: right;
}

.app-item .usage-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.app-item .usage-sessions {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Content List */
.content-list {
    max-height: 400px;
    overflow-y: auto;
}

.content-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f9fafb;
}

.content-item .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.content-item .app-name {
    font-weight: 600;
    color: #374151;
}

.content-item .content-type {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.content-item .content-text {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.content-item .content-time {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Alerts List */
.alerts-list {
    max-height: 400px;
    overflow-y: auto;
}

.alert-item {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid;
}

.alert-item.high {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.alert-item.medium {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.alert-item.low {
    background: #f0f9ff;
    border-left-color: #3b82f6;
}

.alert-item .alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.alert-item .alert-type {
    font-weight: 600;
    color: #374151;
}

.alert-item .alert-severity {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.alert-item.high .alert-severity {
    background: #dc2626;
    color: white;
}

.alert-item.medium .alert-severity {
    background: #f59e0b;
    color: white;
}

.alert-item.low .alert-severity {
    background: #3b82f6;
    color: white;
}

.alert-item .alert-message {
    color: #6b7280;
    font-size: 0.9rem;
}

.alert-item .alert-time {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Filters */
.content-filter, .date-filter {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-filter label, .date-filter label {
    font-weight: 500;
    color: #374151;
}

.content-filter select, .date-filter select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
}

/* Notifications Detailed List */
.notifications-detailed-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-detailed-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f9fafb;
}

.notification-detailed-item .notification-app {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.notification-detailed-item .notification-text {
    color: #6b7280;
    font-size: 0.9rem;
}

.notification-detailed-item .notification-time {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Daily Summary List */
.daily-summary-list {
    max-height: 400px;
    overflow-y: auto;
}

.daily-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #667eea;
}

.daily-summary-item .date {
    font-weight: 600;
    color: #374151;
}

.daily-summary-item .usage-stats {
    text-align: right;
}

.daily-summary-item .total-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.daily-summary-item .data-points {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Sessions List */
.sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #f9fafb;
}

.session-item .session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.session-item .session-app {
    font-weight: 600;
    color: #374151;
}

.session-item .session-duration {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.session-item .session-time {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .map-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Esconde botões do header no mobile */
    .user-info {
        display: none;
    }
    
    /* Ajusta sidebar no mobile */
    .sidebar-actions {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .sidebar-buttons {
        gap: 0.5rem;
    }
    
    .sidebar-buttons button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .map-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .map-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .info-content {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.child-item,
.notification-item,
.info-item {
    animation: fadeIn 0.3s ease;
} 