
:root {
    --text-dark: #1c1c1e;
    --text-secondary: #6c757d;
    --background-light: #f2f2f7;
    --card-background: #ffffff;
    --border-color: #e5e5ea;
    --primary-blue: #007aff;
    --primary-red: #ff3b30;
    --tag-bg: #e9ecef;
}

body {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.monitoring-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    padding-top: 80px;
}

/* Tabs Navigation */
.monitoring-tabs {
    display: flex;
    background: #e9ecef;
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.mon-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.mon-tab.active {
    background: white;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Setup Page Styles */
.category-block {
    background: var(--card-background);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary-red);
}

.words-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.word-tag {
    background: var(--tag-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.word-delete {
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: bold;
    line-height: 1;
}
.word-delete:hover {
    color: var(--primary-red);
}

.add-word-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mon-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 16px; /* Fixed to 16px to prevent zoom on iOS */
    outline: none;
    background-color: #f9f9f9;
}
.mon-input:focus {
    border-color: var(--primary-blue);
    background-color: #fff;
}

.btn-add {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* --- NEW Settings Section Styles --- */
.settings-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Time Inputs */
.time-inputs-row {
    display: flex;
    gap: 0.5rem;
}
.time-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 0.5rem;
}
.time-input-group input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.8rem 0.5rem;
    text-align: center;
    font-weight: 600;
    outline: none;
    font-size: 16px; /* Fixed to 16px to prevent zoom on iOS */
}
.time-input-group span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-right: 0.5rem;
    font-weight: 500;
}

/* Scope Toggles */
.scope-toggles {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.scope-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: #f9f9f9;
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    user-select: none;
}
.scope-checkbox:hover { background: #e9ecef; }
.scope-checkbox input:checked + span { color: var(--primary-blue); font-weight: 600; }
.scope-checkbox.checked { border-color: var(--primary-blue); background: rgba(0,122,255,0.05); }
.scope-checkbox span { font-size: 16px; } /* Ensure readable size */

/* Textareas */
.mon-textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 16px; /* Fixed to 16px to prevent zoom on iOS */
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    outline: none;
    background-color: #f9f9f9;
}
.mon-textarea:focus { 
    border-color: var(--primary-blue); 
    background-color: #fff;
}

.btn-save-settings {
    background: #333;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
    font-size: 1rem;
}
.btn-save-settings:hover { background: #000; }

/* Footer Add Btn */
.add-category-btn-block {
    margin-top: 2rem;
    text-align: center;
}

.btn-large {
    background: var(--text-dark);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Monitoring List Styles (Dashboard) */
.monitoring-date-header {
    background: #e9ecef;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    font-size: 0.95rem;
}
.monitoring-date-header:first-child {
    margin-top: 0;
}

.incident-card {
    background: white;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-red);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.incident-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.incident-participants {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.incident-message {
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    color: #333;
    line-height: 1.5;
}

.highlighted-word {
    background-color: #ffeb3b;
    color: #000;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
}
