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

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --accent: #e94560;
    --highlight: #f39c12;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

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

.login-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
    color: var(--highlight);
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-links {
    text-align: center;
    margin-top: 16px;
}

.auth-links a {
    color: var(--highlight);
    text-decoration: none;
    font-size: 14px;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-divider {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin: 16px 0 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    color: var(--text-secondary);
}

.input-group input {
    padding: 14px 16px;
    border: 2px solid var(--bg-secondary);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-group input[type="time"] {
    cursor: pointer;
}

.input-group input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-primary);
}

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

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #1e2d4d;
}

/* App Page */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-secondary);
}

.app-header h1 {
    font-size: 18px;
    color: var(--highlight);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: var(--bg-primary);
}

.sync-status.online {
    color: #2ecc71;
}

.sync-status.offline {
    color: var(--accent);
}

.sync-status.syncing {
    color: var(--highlight);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
}

.btn-logout:hover {
    color: var(--accent);
}

.app-main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Ponto Button */
.ponto-btn-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.ponto-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--highlight));
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

.ponto-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.6);
}

.ponto-btn:active {
    transform: scale(0.98);
}

/* Registro Cards */
.registros {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.registro-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--highlight);
}

.registro-label {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}

.registro-hora {
    font-size: 18px;
    font-weight: 600;
    color: var(--highlight);
    flex: 1;
    text-align: center;
}

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

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

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

.modal {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--highlight);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Day Details Modal */
.dia-detalhes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dia-detalhe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-primary);
    border-radius: 8px;
}

.dia-detalhe-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.dia-detalhe-valor {
    font-size: 16px;
    font-weight: 600;
    color: var(--highlight);
}

/* Registro Card Clickable */
.registro-card-click {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.registro-card-click:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Diff Colors */
.diff-positivo {
    color: #2ecc71;
}

.diff-negativo {
    color: var(--accent);
}

/* Saldo Card */
.saldo-card {
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    text-align: center;
}

.saldo-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.saldo-valor {
    font-size: 36px;
    font-weight: bold;
    color: var(--highlight);
}

/* Bottom Nav */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--highlight);
}

.nav-item span {
    font-size: 12px;
}

.nav-icon {
    font-size: 20px;
}

/* Profile Card */
.perfil-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.perfil-card-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--highlight);
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row .input-group {
    flex: 1;
}

.input-row .input-group input {
    padding: 10px 12px;
    font-size: 14px;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
}

.carga-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: var(--bg-primary);
    border-radius: 8px;
}

.carga-total-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.carga-total-valor {
    font-size: 20px;
    font-weight: bold;
    color: var(--highlight);
}

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

.error-msg {
    color: var(--accent);
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

.success-msg {
    color: #2ecc71;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}
