:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #333;
    --text-secondary: #2c3e50;
    --border-color: #e0e0e0;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --status-pending: #f1c40f;
    --status-success: #2ecc71;
    --status-error: #e74c3c;
    --status-processing: #3498db;
    --status-default: #95a5a6;
    --timestamp-color: #7f8c8d;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #404040;
    --accent-color: #66bb6a;
    --accent-hover: #45a049;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --status-pending: #f39c12;
    --status-success: #27ae60;
    --status-error: #c0392b;
    --status-processing: #2980b9;
    --status-default: #7f8c8d;
    --timestamp-color: #95a5a6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    color: var(--text-secondary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.input-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.store-toggle {
    margin-bottom: 2rem;
}

.toggle-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

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

button[type="submit"] {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: var(--accent-hover);
}

button[type="submit"]:disabled {
    background-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.result-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    min-height: 100px;
}

.entry {
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: var(--bg-secondary);
}

.entry:last-child {
    margin-bottom: 0;
}

.entries-empty {
    color: var(--text-secondary);
    font-style: italic;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.entry-title {
    font-weight: 600;
    color: var(--text-primary);
}

.entry-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.entry-details {
    color: var(--text-secondary);
    margin: 5px 0;
}

.status {
    padding: 0.5rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

.status-pending {
    background-color: var(--status-pending);
    color: #fff;
}

.status-success {
    background-color: var(--status-success);
    color: #fff;
}

.status-error {
    background-color: var(--status-error);
    color: #fff;
}

.status-processing {
    background-color: var(--status-processing);
    color: #fff;
}

.status-default {
    background-color: var(--status-default);
    color: #fff;
}

.statistics-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.statistics-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-details {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stat-details .small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.stat-details strong {
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 200px;
    margin-bottom: 1rem;
}

.stats-overview {
    display: flex;
    flex-direction: column;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

/* ── Toast notification ─────────────────────────────────────────────────────── */

.toast-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px var(--shadow-color);
    animation: toast-in 0.2s ease;
}

.toast--error {
    background-color: var(--status-error);
}

.toast--success {
    background-color: var(--status-success);
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    opacity: 0.8;
    width: auto;
}

.toast-close:hover {
    opacity: 1;
    background: none;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
} 