/* HCS Jamf Pro Fitness Reporter - Dark Theme Web UI */

:root {
    /* HCS Brand Colors (matching macOS app) */
    --hcs-blue: #327abf;  /* rgb(50, 122, 191) - #327abf */
    --hcs-blue-dark: #2562a0;

    /* Dark Theme Colors */
    --dark-bg: #19191e;  /* rgb(0.1, 0.1, 0.12) */
    --light-bg: #26262c;  /* rgb(0.15, 0.15, 0.18) */
    --input-bg: #1a1a1f;

    /* Semantic Colors */
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a5;
    --text-tertiary: #7f8c8d;

    /* Border & Accents */
    --border-color: #3a3a40;
    --border-light: #2a2a30;
}

/* Light Theme */
body[data-theme="light"] {
    --dark-bg: #f5f5f7;
    --light-bg: #ffffff;
    --input-bg: #f9f9f9;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;

    --border-color: #d2d2d7;
    --border-light: #e5e5ea;
}

body[data-theme="light"] {
    background: #f5f5f7;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    padding: 8px;
    background: rgba(50, 122, 191, 0.2);
    border: none;
    border-radius: 8px;
    color: var(--hcs-blue);
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
}

.theme-toggle-btn:hover {
    background: rgba(50, 122, 191, 0.3);
    transform: scale(1.05);
}

.theme-icon {
    line-height: 1;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--light-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Header with HCS Logo */
header {
    background: var(--dark-bg);
    color: var(--text-primary);
    padding: 30px;
    text-align: center;
    position: relative;
}

.header-actions {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.report-bug-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.report-bug-btn:hover {
    background: rgba(231, 76, 60, 0.3);
}

.bug-icon {
    font-size: 0.9rem;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(50, 122, 191, 0.2);
    color: var(--hcs-blue);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.help-btn:hover {
    background: rgba(50, 122, 191, 0.3);
}

.help-icon {
    font-size: 0.9rem;
}

/* What's New Button - matches help-btn style */
.whats-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(50, 122, 191, 0.2);
    color: var(--hcs-blue);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
    font-family: inherit;
}

.whats-new-btn:hover {
    background: rgba(50, 122, 191, 0.3);
}

.whats-new-icon {
    font-size: 0.9rem;
}

.user-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(50, 122, 191, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
}

.logout-btn {
    color: var(--hcs-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    color: var(--info-color);
    text-decoration: underline;
}

.hcs-logo {
    height: 60px;
    margin-bottom: 10px;
    border-radius: 12px;
}

header h1 {
    font-size: 1.75rem;
    margin-bottom: 5px;
    font-weight: 700;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main Content */
.main-content {
    padding: 30px;
}

/* Progress Container */
.progress-container {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--dark-bg);
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--input-bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hcs-blue), var(--success-color));
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Messages */
.message-container {
    margin-bottom: 20px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.message.success {
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--success-color);
}

.message.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--error-color);
}

.message.info {
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: var(--info-color);
}

/* Form Sections */
.form-section {
    background: var(--dark-bg);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.form-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--hcs-blue);
    font-weight: 700;
}

.section-header {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 25px 0 15px 0;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 25px 0;
}

/* Info Banner */
.info-banner {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-banner strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.info-banner p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* Warning Banner (yellow) - Dark Mode Compatible */
.info-banner.warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-left: 4px solid #f59e0b;
}

.info-banner.warning strong {
    color: #fbbf24;
}

.info-banner.warning p {
    color: var(--text-secondary);
}

/* Light theme adjustments for warning banner */
body[data-theme="light"] .info-banner.warning {
    background: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 4px solid #f59e0b;
}

body[data-theme="light"] .info-banner.warning strong {
    color: #b45309;
}

body[data-theme="light"] .info-banner.warning p {
    color: #92400e;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.label-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.label-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 1.2rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 2px solid var(--border-light);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--hcs-blue);
    box-shadow: 0 0 0 3px rgba(50, 122, 191, 0.2);
}

.form-group textarea {
    resize: vertical;
    font-family: monospace;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* Upload Buttons */
.upload-btn-small {
    padding: 5px 10px;
    background: rgba(52, 152, 219, 0.2);
    border: none;
    border-radius: 5px;
    color: var(--info-color);
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.upload-btn-small:hover {
    background: rgba(52, 152, 219, 0.3);
}

.upload-btn-small.uploaded {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
}

/* Toggle Secret Button */
.toggle-secret-btn {
    position: absolute;
    right: 10px;
    top: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toggle-secret-btn:hover {
    opacity: 1;
}

/* Make form-group relative for toggle button positioning */
.form-group {
    position: relative;
}

/* File Status */
.file-status {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

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

/* Credentials Parsed Display */
.credentials-parsed {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.success-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.credentials-parsed strong {
    display: block;
    color: var(--success-color);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.credentials-parsed p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 2px 0;
}

.required-note {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-top: 20px;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    text-align: center;
    padding: 0 25px 25px 25px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--hcs-blue), var(--hcs-blue-dark));
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 122, 191, 0.3);
    min-width: 200px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 122, 191, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.submit-btn span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--dark-bg);
    padding: 20px 30px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--hcs-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--info-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 8px;
    }

    header {
        padding: 20px;
    }

    .hcs-logo {
        height: 50px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 20px;
    }

    .form-section {
        padding: 20px;
    }

    .label-with-button {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .submit-btn {
        width: 100%;
    }

    .header-actions {
        position: static;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .header-left,
    .header-right {
        justify-content: center;
    }
}

/* ======================= */
/* What's New Modal Styles */
/* ======================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--light-bg);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.whats-new-modal {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--dark-bg);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.changelog-version {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.changelog-version:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.changelog-version h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hcs-blue);
    margin-bottom: 16px;
}

.changelog-section {
    margin-bottom: 16px;
}

.changelog-section:last-child {
    margin-bottom: 0;
}

.changelog-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.changelog-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-section li {
    padding: 6px 0 6px 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.changelog-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--hcs-blue);
    font-weight: bold;
}

.changelog-section li strong {
    color: var(--text-primary);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: var(--dark-bg);
    border-radius: 0 0 16px 16px;
}

.modal-btn-primary {
    background: var(--hcs-blue);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-primary:hover {
    background: var(--hcs-blue-dark);
    transform: translateY(-1px);
}

/* Light theme modal adjustments */
body[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

body[data-theme="light"] .modal-close {
    background: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .modal-close:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Mobile modal styles */
@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
        margin: 10px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 12px 20px;
    }

    .changelog-version h3 {
        font-size: 1rem;
    }

    .changelog-section h4 {
        font-size: 0.9rem;
    }

    .changelog-section li {
        font-size: 0.85rem;
    }
}
