:root {
    --bg-color: #f4f6f9;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --primary-color: #007aff;
    --primary-hover: #0056b3;
    --danger-color: #ff3b30;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-neumorph: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
    --shadow-neumorph-inset: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff;
    --border-radius: 24px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Smartwatch Container */
.watch-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

@media (min-width: 768px) {
    .watch-container {
        max-width: 440px;
        height: 850px;
        min-height: auto;
        border-radius: 50px;
        border: 12px solid #1a1a1a;
        box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    }
}

.watch-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.watch-screen::-webkit-scrollbar {
    width: 4px;
}
.watch-screen::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Cabeçalho */
.watch-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.shining-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #2c3e50, #007aff, #2c3e50);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shineText 4s linear infinite;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Menu Principal / Grid */
.watch-menu {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding-bottom: 20px;
}

.social-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-neumorph);
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.social-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 122, 255, 0.15);
    border-color: var(--primary-color);
}

.social-card:active {
    transform: scale(0.95);
}

.social-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.social-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Rodapé do Watch */
.watch-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

.btn-dashboard {
    flex: 1;
    background: linear-gradient(135deg, #007aff, #0056b3);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    transition: all var(--transition-speed);
}

.btn-dashboard:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-settings {
    background: #e4e6eb;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-color);
    transition: all var(--transition-speed);
}

.btn-settings:hover {
    background: #d8dadf;
    transform: rotate(45deg);
}

.brand-footer {
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
    letter-spacing: 1px;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; text-shadow: 0 0 8px rgba(0, 122, 255, 0.4); }
}

/* Modais */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    width: 95%;
    max-width: 900px;
    height: 90vh;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform var(--transition-speed);
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.small-modal {
    max-width: 400px;
    height: auto;
    max-height: 90vh;
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-modal {
    background: #f0f2f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    transition: background var(--transition-speed);
}

.close-modal:hover {
    background: #e4e6eb;
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Abas do Dashboard */
.dash-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    background: #f0f2f5;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-speed);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Painel Geral - Grid de Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 16px;
    box-shadow: var(--shadow-neumorph);
    border: 1px solid #eaeaea;
}

.stat-card h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Estatísticas Individuais */
.individual-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
}

.ind-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #eaeaea;
}

.ind-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ind-card-header i {
    font-size: 1.5rem;
}

.ind-card-body p {
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

/* Controles e Botões Gerais */
.modern-select, .modern-input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #dcdcdc;
    background: #f9f9f9;
    font-size: 0.9rem;
    margin-bottom: 15px;
    outline: none;
    transition: border var(--transition-speed);
}

.modern-select:focus, .modern-input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.charts-controls {
    margin-bottom: 15px;
}

.chart-container-wrapper {
    position: relative;
    height: 380px;
    width: 100%;
}

.history-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

@media(max-width: 600px) {
    .history-controls {
        grid-template-columns: 1fr;
    }
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.btn-action {
    background: #f0f2f5;
    border: 1px solid #dcdcdc;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-speed);
}

.btn-action:hover {
    background: #e4e6eb;
}

.btn-action.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-action.primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity var(--transition-speed);
}

.btn-danger:hover {
    opacity: 0.85;
}

.full-width {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* Tabela Moderna */
.table-responsive {
    overflow-x: auto;
    max-height: 350px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.modern-table th, .modern-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
}

.modern-table th {
    background: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 2;
}

.modern-table tr:hover {
    background: #fdfdfd;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
}

.page-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Configurações Item */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.divider {
    border: 0;
    height: 1px;
    background: #eaeaea;
    margin: 20px 0;
}

.danger-zone h4 {
    color: var(--danger-color);
    margin-bottom: 6px;
}

.danger-zone p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}