:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --accent: #00adb5;
    --accent-success: #4e9f3d;
    --text: #eeeeee;
    --text-dim: #b0b0b0;
    --border: #333333;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 { font-size: 1.5rem; margin: 0; }
h3 { font-size: 1.1rem; margin-top: 0; margin-bottom: 12px; }

.sub-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: -6px;
    margin-bottom: 12px;
}

.badge {
    font-size: 0.75rem;
    background-color: #2a2a2a;
    padding: 4px 8px;
    border-radius: 12px;
    color: var(--accent);
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.med-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.med-info h2 { margin: 0 0 4px 0; font-size: 1.3rem; }
.med-time { font-size: 0.9rem; color: var(--text-dim); }
.next-time { color: var(--accent); font-weight: bold; margin-top: 4px; }

.btn {
    background-color: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.btn-secondary {
    background-color: #333;
}

.btn:active { opacity: 0.8; }

form { display: flex; flex-direction: column; gap: 10px; }
input {
    background: #2a2a2a;
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}
.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.history-grid {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.day-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.day-icon:hover, .day-icon.selected {
    background-color: #2a2a2a;
}

.status-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.status-dot.done { background-color: var(--accent-success); }

.history-details {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.details-header {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.details-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #282828;
}

.details-item:last-child {
    border-bottom: none;
}

.details-time {
    color: var(--text-dim);
}
