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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f6f8fa;
    height: 100vh;
    overflow: auto;
}

.hidden {
    display: none !important;
}

.screen {
    min-height: 100vh;
    width: 100%;
}

/* Login page styles */
.login-body {
    background: linear-gradient(135deg, #f5f7fa, #e4e8eb);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px 0;
}

.login-container {
    width: 100%;
    max-width: 520px;
    padding: 20px;
    margin: 40px auto;
}

.login-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 40px;
    text-align: center;
}

.login-logo {
    margin-bottom: 20px;
}

.login-card h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #24292e;
}

.login-desc {
    color: #586069;
    margin-bottom: 20px;
}

/* App features section */
.app-features {
    background: #f6f8fa;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.app-features h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #24292e;
    text-align: center;
}

.app-features ul {
    list-style: none;
}

.app-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-icon {
    margin-right: 10px;
    font-size: 18px;
}

.feature-note {
    margin-top: 15px;
    font-size: 13px;
    color: #586069;
    padding-top: 15px;
    border-top: 1px solid #e1e4e8;
    text-align: center;
    font-style: italic;
}

.token-note {
    margin-top: 10px;
    font-size: 12px;
    color: #586069;
    font-style: italic;
}

.login-form {
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #24292e;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3);
}

.login-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 24px;
    background-color: #2ea44f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #2c974b;
}

.login-button:active {
    background-color: #28883f;
}

.login-help {
    margin-top: 20px;
    text-align: center;
}

.login-help a {
    color: #0366d6;
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

.error-message {
    color: #d73a49;
    background-color: #ffeef0;
    border: 1px solid #ffdce0;
    border-radius: 6px;
    padding: 12px;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #0366d6;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    color: #0366d6;
    font-size: 18px;
    font-weight: 500;
}

/* Dashboard page styles */
.dashboard-body {
    background-color: #f6f8fa;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.dashboard-header {
    background-color: #24292e;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1,
.dashboard-header .dashboard-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.user-info {
    font-size: 14px;
    color: #c8d1d9;
    display: flex;
    align-items: center;
}

.username {
    font-weight: 600;
    color: white;
    margin-right: 15px;
}

.logout-button {
    background-color: #d73a49;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background-color: #cb2431;
}

.dashboard-content {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.chart-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    padding: 24px;
    margin-bottom: 24px;
    content-visibility: auto;
    contain-intrinsic-size: 0 480px;
}

.chart-section h2 {
    font-size: 18px;
    color: #24292e;
    margin-bottom: 16px;
    text-align: center;
}

.chart-container {
    height: 400px;
    position: relative;
}

.zoom-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.zoom-btn {
    background-color: #0366d6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zoom-btn:hover {
    background-color: #0353b3;
}

.zoom-btn:active {
    background-color: #034ca3;
}

.zoom-instruction {
    color: #586069;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* Responsive styles */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }
    .login-card {
        padding: 20px;
    }
    .dashboard-content {
        padding: 15px;
    }
    .chart-container {
        height: 300px;
    }
}