/* Settings Page Styles */
:root {
    --text-secondary: var(--dark-gray);
    --input-bg: var(--card-bg);
    --text-muted: #6c757d;
    --hover-bg: rgba(0, 0, 0, 0.05);
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Header Styles */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 20px 0 !important;
    margin-bottom: 30px;
    height: auto !important;
    min-height: 80px !important;
    max-height: none !important;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    height: auto !important;
}

.app-title {
    display: flex;
    align-items: center;
    flex-shrink: 0 !important;
}

.app-title h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin: 0;
}

.app-title i {
    font-size: 2rem;
    margin-right: 15px;
    color: var(--primary-color);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 20px;
    margin: 0 20px !important;
    flex-grow: 1 !important;
    justify-content: center !important;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.nav-link i {
    font-size: 1rem;
}

/* Settings Button */
.settings-container {
    position: relative;
    margin-left: 10px;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.settings-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.settings-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 1000;
    display: none;
    padding: 10px 0;
    margin-top: 5px;
}

.settings-menu.active {
    display: block;
}

.settings-item {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
    transition: color 0.3s;
}

.settings-link:hover {
    color: var(--primary-color);
}

.settings-link i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.github-link {
    color: var(--text-color);
}

.github-link:hover {
    color: #6e5494;
}

/* Content Styles */
.content-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    overflow-x: hidden;
}

.content-wrapper h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.settings-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-option:last-child {
    border-bottom: none;
}

.option-label {
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.option-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.settings-form {
    margin-top: 15px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-row input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 47px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: var(--medium-gray);
    transition: .4s;
    border-radius: 34px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(23px);
}

/* Responsive */
@media (max-width: 768px) {
    .settings-option {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-label {
        margin-bottom: 10px;
    }
}

/* Delete account modal */
.delete-account-warning {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 15px;
}

.delete-confirm-input {
    margin: 15px 0;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

/* Form select styling */
.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Text center utility */
.text-center {
    text-align: center;
}

/* Danger zone */
.danger-zone {
    background-color: rgba(255, 0, 0, 0.05);
}

.dark-mode .danger-zone {
    background-color: rgba(255, 0, 0, 0.1);
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: #fff;
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
}

.btn-outline:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form control */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--input-bg);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
    word-wrap: break-word;
}

.form-control:focus {
    color: var(--text-color);
    background-color: var(--input-bg);
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled {
    background-color: var(--light-gray);
    opacity: 0.7;
}

/* Modal styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-backdrop);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Card styles */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    word-wrap: break-word;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.card-body {
    padding: 20px;
}

.danger-card {
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.danger-card .card-header {
    background-color: rgba(220, 53, 69, 0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled {
    background-color: var(--light-gray);
    opacity: 0.7;
}

/* Preference item */
.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-item label {
    font-weight: 500;
    margin-bottom: 5px;
}

.preference-item p {
    margin: 0;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-danger {
    color: var(--danger-color);
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: #fff;
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-outline-primary {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Success icon */
.success-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: block;
}

/* Loading Container */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loading-backdrop);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: toast-in 0.3s ease-out;
    max-width: 350px;
}

.toast i {
    font-size: 18px;
}

.toast-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--secondary-color);
}

.toast-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.toast-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--primary-color);
}

.toast-fade-out {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Dark mode adjustments */
.dark-mode .form-control {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.dark-mode .toast-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #d4edda;
}

.dark-mode .toast-error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #f8d7da;
}

.dark-mode .toast-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: #fff3cd;
}

.dark-mode .toast-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #d1ecf1;
}

.dark-mode .spinner {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
}

/* Admin Actions Grid */
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.admin-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--text-color);
}

.admin-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.admin-action-btn i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.admin-action-btn span {
    font-weight: 500;
    text-align: center;
}

/* Specific button colors */
#refreshUsersBtn i {
    color: #4299e1; /* Blue */
}

#checkAdminBtn i {
    color: #4a5568; /* Gray */
}

#showUsersBtn i {
    color: #48bb78; /* Green */
}

#testApiBtn i {
    color: #ed8936; /* Orange */
}

@media (max-width: 576px) {
    .admin-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* Style for current user info display */
.current-user-info {
    margin-bottom: 20px; /* Matches HTML style */
    padding-bottom: 15px; /* Matches HTML style */
    border-bottom: 1px solid var(--border-color); /* Matches HTML style */
    background-color: rgba(var(--primary-rgb), 0.05); /* Subtle background highlight */
    padding: 15px;
    border-radius: var(--border-radius);
}

.current-user-info p {
    margin: 0; /* Remove default paragraph margins */
}

.current-user-info p:first-child {
    font-size: 1.1rem; /* Slightly larger font for the name line */
    color: var(--text-color);
}

.current-user-info p:last-child {
    font-size: 0.9rem; /* Smaller font for the email line */
    color: var(--text-muted);
    margin-top: 5px; /* Add a little space below the name */
}

.current-user-info strong {
    color: var(--primary-color); /* Highlight the label */
}

.current-user-info span {
    font-weight: normal; /* Ensure the actual name/email isn't bold */
}

/* Dark mode adjustments */
:root[data-theme="dark"] .current-user-info {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-bottom-color: var(--border-color);
}

:root[data-theme="dark"] .current-user-info p:first-child {
     color: var(--text-color);
}

:root[data-theme="dark"] .current-user-info p:last-child {
     color: var(--text-muted);
}

:root[data-theme="dark"] .current-user-info strong {
     color: var(--primary-color);
}

/* Apprise Notifications Styles */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.dark-mode .alert-warning {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
}

.apprise-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.apprise-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.dark-mode .status-item {
    background-color: rgba(255, 255, 255, 0.05);
}

.status-label {
    font-weight: 600;
    color: var(--text-color);
}

.status-value {
    color: var(--primary-color);
    font-weight: 500;
}

.services-info {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.dark-mode .services-info {
    background-color: rgba(255, 255, 255, 0.05);
}

.services-info p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: 1px solid #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

@media (max-width: 768px) {
    .apprise-actions {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Dark mode link styling for text-muted elements */
.dark-mode .text-muted a {
    color: var(--primary-color);
    text-decoration: underline;
}

.dark-mode .text-muted a:hover {
    color: #6db4ff;
    text-decoration: underline;
}

/* General link styling for better dark mode visibility */
:root[data-theme="dark"] .text-muted a {
    color: var(--primary-color);
    text-decoration: underline;
}

:root[data-theme="dark"] .text-muted a:hover {
    color: #6db4ff;
    text-decoration: underline;
}

/* Collapsible Cards */
.collapsible-card {
    transition: all 0.3s ease;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.3s ease;
}

.collapsible-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .collapsible-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.collapse-icon {
    transition: transform 0.3s ease;
    color: var(--text-color);
    opacity: 0.7;
}

.collapsible-header:hover .collapse-icon {
    opacity: 1;
}

.collapsible-card.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 2000px; /* Large enough to show all content */
    opacity: 1;
}

.collapsible-card.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Ensure smooth transitions for nested elements */
.collapsible-content * {
    transition: none; /* Prevent nested transitions from interfering */
}

@media (max-width: 768px) {
    .apprise-actions {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Footer Overrides - Ensure footer spans full width without causing horizontal scroll */
.warracker-footer {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

/* Additional mobile responsive styles if needed */
@media (max-width: 768px) {
    .warracker-footer {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Paperless-ngx Integration Styles */
.paperless-button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.paperless-button-group .btn {
    flex: 0 0 auto;
    min-width: 150px;
}

.paperless-status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background-color: var(--light-gray);
    color: var(--text-color);
    font-size: 0.9rem;
    display: none;
}

.paperless-status-message.show {
    display: block;
}

.paperless-status-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.paperless-status-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.paperless-status-message.info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.dark-mode .paperless-status-message {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .paperless-status-message.success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #5cb85c;
}

.dark-mode .paperless-status-message.error {
    background-color: rgba(220, 53, 69, 0.2);
    color: #d9534f;
}

.dark-mode .paperless-status-message.info {
    background-color: rgba(23, 162, 184, 0.2);
    color: #5bc0de;
}

/* Responsive design for paperless buttons */
@media (max-width: 576px) {
    .paperless-button-group {
        flex-direction: column;
    }
    
    .paperless-button-group .btn {
        width: 100%;
        min-width: unset;
    }
}

