/* admin.css */

/* Owner Settings Panel */
.settings-group {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-group h3 {
    margin-top: 0;
    color: var(--secondary-color);
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.admin-login {
    max-width: 400px;
    margin: 4rem auto;
}

#logout-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

#logout-btn:hover {
    background: white;
    color: var(--primary-color);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
}

.tab {
    background: none;
    border: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #666;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
}

.tab.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab:hover {
    background: #f0f0f0;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 5px solid var(--primary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.card-header h3 {
    margin: 0;
    color: var(--secondary-color);
}

.description-box {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    font-style: italic;
}

.notes-section {
    margin-top: 10px;
}

.notes-section textarea {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    resize: vertical;
}

.notes-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.accept-btn, .log-btn, .secondary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
}

.secondary-btn {
    background: #555;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.deny-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.accept-btn:hover, .log-btn:hover { background: var(--secondary-color); }
.deny-btn:hover { background: #b71c1c; }
.secondary-btn:hover { background: #333; }

/* AI Secretary Styles */
.chat-box {
    border: 1px solid #ccc;
    height: 350px;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.chat-input-area {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.chat-input-area input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1rem;
    font-family: inherit;
}

.chat-input-area input[type="file"] {
    width: 100%;
    padding: 5px;
    margin-bottom: 5px;
}

.ai-msg {
    background: #e8f5e9;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.user-msg {
    background: #e3f2fd;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

/* Calendar Styles */
#calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#calendar-controls button {
    padding: 0.5rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#calendar-controls button:hover {
    background: var(--secondary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #ddd;
    padding: 4px;
    border-radius: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 8px 0;
    background: #fff;
    font-size: 0.85rem;
    color: #555;
}

.calendar-day {
    background: #fff;
    min-height: 75px;
    padding: 6px;
    cursor: pointer;
    border-radius: 3px;
}

.calendar-day:hover {
    background: #e8f5e9;
}

.calendar-day.empty {
    background: #f5f5f5;
    cursor: default;
}

.calendar-day .date-num {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
    color: #333;
}

.job-indicator {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-details {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-box h3 {
    margin-top: 0;
    color: var(--secondary-color);
}

.modal-box label {
    display: block;
    margin: 1rem 0 0.4rem;
    font-weight: bold;
}

.modal-box input,
.modal-box textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* ANNA Platform Hub in Admin */
.anna-hub-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
}
.anna-hub-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}
.anna-hub-header h2 {
    margin: 0.2rem 0;
    font-size: 2rem;
    color: #1b5e20;
}
.anna-tagline {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.anna-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}
.anna-feature-item {
    display: flex;
    gap: 12px;
    background: #fbfbfb;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #eee;
}
.anna-feature-icon {
    font-size: 1.8rem;
    line-height: 1;
}
.anna-feature-item strong {
    display: block;
    color: #333;
    margin-bottom: 4px;
}
.anna-feature-item p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}
.anna-action-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.anna-action-banner h4 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
}
.anna-action-banner p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}
.anna-launch-btn {
    background: white;
    color: #1b5e20;
    text-decoration: none;
    font-weight: bold;
    padding: 0.8rem 1.4rem;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.anna-launch-btn:hover {
    background: #f1f8e9;
    color: #1b5e20;
}
.anna-enrollment-box {
    background: #f1f8e9;
    border-left: 4px solid #2e7d32;
    padding: 1.2rem;
    border-radius: 0 8px 8px 0;
}
.anna-enrollment-box h3 {
    margin-top: 0;
    color: #1b5e20;
    font-size: 1.1rem;
}
.anna-enrollment-box p {
    margin: 0.4rem 0 0;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Responsive Overrides for Mobile / ANNA Webview ── */
@media (max-width: 600px) {
    main {
        padding: 10px !important;
    }
    .card {
        padding: 10px;
    }
    .calendar-grid {
        min-width: 500px;
        overflow-x: auto;
    }
    /* Allow parent container to scroll the grid */
    .card:has(.calendar-grid) {
        overflow-x: auto;
    }
}
