/* Internal Page Components - Design System */

/* ===== BASE VARIABLES ===== */
:root {
    /* Colors */
    --primary-blue: #17a9e4;
    --primary-blue-dark: #1485b8;
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --text-muted: #999;
    --background-white: #ffffff;
    --background-light: #f8f9fa;
    --background-gray: #e5e7eb;
    --border-light: #e5e7eb;
    --border-medium: #ddd;

    /* Status Colors */
    --success: #28a745;
    --success-light: #d4edda;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --info: #17a9e4;
    --info-light: #d1ecf1;

    /* Spacing Scale (8px base) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Touch-friendly */
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Button Variants */
.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

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

.btn-secondary {
    background-color: var(--background-gray);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background-color: var(--border-light);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

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

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

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

.btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
    min-height: 52px;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* ===== HEADERS ===== */
.page-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
}

.page-header .page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin: 0;
}

.page-header .header-actions {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: var(--font-size-2xl);
    }

    .page-header .page-subtitle {
        font-size: var(--font-size-base);
    }

    .page-header .header-actions {
        flex-direction: column;
    }
}

/* ===== BREADCRUMBS ===== */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.breadcrumb-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--primary-blue-dark);
}

.breadcrumb-nav .separator {
    color: var(--text-muted);
    margin: 0 var(--space-xs);
}

/* ===== TABLES ===== */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table thead {
    background: var(--background-light);
    border-bottom: 2px solid var(--border-light);
}

.table th {
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background: var(--background-light);
}

/* Mobile Table Styles */
@media (max-width: 768px) {
    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: var(--space-md);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);
        padding: var(--space-md);
    }

    .table td {
        display: block;
        text-align: left;
        padding: var(--space-xs) 0;
        border: none;
        position: relative;
    }

    .table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        margin-right: var(--space-sm);
        min-width: 100px;
        color: var(--text-secondary);
    }
}

/* ===== FORMS ===== */
.form-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(23, 169, 228, 0.1);
}

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

.form-error {
    border-color: var(--danger);
}

.form-error-message {
    color: var(--danger);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

/* Checkboxes and Radios */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.form-check label {
    margin: 0;
    cursor: pointer;
}

/* ===== MODALS ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

/* Full-screen modal for task editing */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    /* allow content to grow so outer overlay (.modal) handles scrolling */
    max-height: none;
    height: auto;
    overflow: visible;
    box-shadow: var(--shadow-xl);
    margin: 3% auto;
    display: block;
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background-light);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
    font-weight: bold;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
    /* no inner scroll; outer overlay scrolls */
    overflow: visible;
}

/* Form styling for modals */
.modal-body .form-group {
    margin-bottom: var(--space-lg);
}

.modal-body label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-base);
    font-family: 'Segoe UI', Arial, sans-serif;
}

.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"],
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    /* Prevents zoom on mobile */
    font-family: 'Segoe UI', Arial, sans-serif;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-body input[type="text"]:focus,
.modal-body input[type="email"]:focus,
.modal-body input[type="password"]:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(23, 169, 228, 0.1);
}

.modal-body input[type="text"]::placeholder,
.modal-body input[type="email"]::placeholder,
.modal-body input[type="password"]::placeholder,
.modal-body textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Checkbox container styling */
.properties-checkbox-container {
    /* full list visible; parent modal handles page scroll */
    max-height: none;
    overflow: visible;
    border: 2px solid var(--border-light);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--background-light);
    margin-top: var(--space-sm);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-md);
    row-gap: 4px;
    margin-bottom: 0;
    /* reduce bottom gap below properties box */
}

.checkbox-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
    /* span both columns so checkboxes start below */
    grid-column: 1 / -1;
}

.checkbox-actions .btn {
    font-size: 12px;
    padding: 4px 12px;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-actions .btn:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background-color 0.2s ease;
    border-radius: var(--radius-sm);
    margin: 0;
}

/* Ensure label text aligns perfectly with checkbox */
.checkbox-label .property-name-only {
    line-height: 1.2;
    display: inline-block;
}

.checkbox-label:hover {
    background-color: rgba(23, 169, 228, 0.05);
    padding-left: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.property-checkbox {
    margin-right: var(--space-sm);
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    vertical-align: middle;
    /* align with text baseline */
    position: relative;
    top: -1px;
    /* nudge up to visually center */
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .modal-body {
        padding: var(--space-md);
    }

    .modal-body input[type="text"],
    .modal-body input[type="email"],
    .modal-body input[type="password"],
    .modal-body textarea,
    .modal-body select {
        padding: 14px 16px;
        /* Larger touch targets */
        font-size: 16px;
        /* Prevents zoom */
    }

    .properties-checkbox-container {
        max-height: none;
        /* no inner scroll on mobile either */
        padding: var(--space-sm);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        /* keep two columns on mobile */
    }

    .checkbox-label {
        padding: 10px 0;
        /* Larger touch targets */
        font-size: 14px;
        /* slightly smaller on mobile */
    }

    .property-checkbox {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }

    .modal-footer {
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .modal-footer .btn {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 48px;
        /* Minimum touch target size */
    }
}

/* Reduce extra space after last form group in modal */
.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding: var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--background-light);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        margin: var(--space-sm);
        height: auto;
    }

    .modal-header,
    .modal-body {
        padding: var(--space-md);
    }

    .modal-footer {
        flex-direction: column;
        flex-shrink: 0;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* ===== HEADER ACTIONS ===== */
.header-actions-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
}

@media (min-width: 769px) {
    .header-actions-container {
        flex-direction: row;
        width: auto;
    }

    .header-actions-container .btn {
        width: auto !important;
        margin-bottom: 0 !important;
    }
}

/* ===== CONFIRMATION MODAL ===== */
.confirmation-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.confirmation-modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    margin: 10% auto;
    text-align: center;
}

.confirmation-modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    background: var(--background-light);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.confirmation-modal-icon {
    font-size: 48px;
    color: var(--danger);
    margin-bottom: var(--space-md);
}

.confirmation-modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0 0 var(--space-sm) 0;
}

.confirmation-modal-message {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
}

.confirmation-modal-body {
    padding: var(--space-xl);
}

.confirmation-modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--background-light);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.confirmation-modal-footer .btn {
    min-width: 100px;
}

@media (max-width: 768px) {
    .confirmation-modal-content {
        max-width: 90%;
        margin: 5% auto;
    }

    .confirmation-modal-header,
    .confirmation-modal-body {
        padding: var(--space-lg);
    }

    .confirmation-modal-footer {
        padding: var(--space-md);
        flex-direction: column;
    }

    .confirmation-modal-footer .btn {
        width: 100%;
    }
}

/* ===== TABLE CELLS ===== */
.editable-cell {
    cursor: default !important;
}

.editable-cell:hover {
    cursor: default !important;
}

.task-name-content,
.properties-content {
    cursor: default !important;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.card-header {
    padding: var(--space-md) var(--space-lg);
    background: var(--background-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: var(--space-lg);
}

.card-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-blue);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-light {
    background: var(--background-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    max-width: 90vw;
    width: 400px;
    animation: slideDown 0.3s ease-out;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-error {
    border-left: 4px solid var(--danger);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

.notification-info {
    border-left: 4px solid var(--info);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 768px) {
    .notification {
        width: calc(100vw - 32px);
        max-width: none;
        left: var(--space-md);
        right: var(--space-md);
        transform: none;
    }
}

/* ===== FULLSCREEN CONFIRMATION MODAL ===== */
.fullscreen-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    /* Dynamic viewport width */
    min-height: 100vh;
    /* Fallback for older browsers */
    min-height: 100dvh;
    /* Dynamic viewport height - accounts for Safari address bar */
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 20px;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    overflow-y: auto;
}

/* Prevent body scroll when modal is active */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.fullscreen-confirmation-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: calc(100vh - 40px);
    /* Fallback for older browsers */
    max-height: calc(100dvh - 40px);
    /* Dynamic viewport height with margin */
    overflow-y: auto;
    animation: fullscreenConfirmationSlideIn 0.3s ease-out;
    margin: auto;
}

@keyframes fullscreenConfirmationSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fullscreen-confirmation-header {
    text-align: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.fullscreen-confirmation-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--danger);
}

.fullscreen-confirmation-icon.success {
    color: var(--success);
}

.fullscreen-confirmation-icon.warning {
    color: var(--warning);
}

.fullscreen-confirmation-icon.info {
    color: var(--info);
}

.fullscreen-confirmation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.fullscreen-confirmation-body {
    padding: 20px 24px;
    text-align: center;
}

.fullscreen-confirmation-message {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.fullscreen-confirmation-details {
    background: var(--background-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.fullscreen-confirmation-actions {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.fullscreen-confirmation-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.fullscreen-confirmation-btn-primary {
    background: var(--danger);
    color: white;
}

.fullscreen-confirmation-btn-primary:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.fullscreen-confirmation-btn-primary.success {
    background: var(--success);
}

.fullscreen-confirmation-btn-primary.success:hover {
    background: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.fullscreen-confirmation-btn-secondary {
    background: var(--background-gray);
    color: var(--text-primary);
}

.fullscreen-confirmation-btn-secondary:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

/* Mobile responsive for fullscreen confirmation */
@media (max-width: 768px) {
    .fullscreen-confirmation-overlay {
        padding: 5px;
        padding: max(5px, env(safe-area-inset-top)) max(5px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
        align-items: center;
        /* Changed from flex-start to center */
        overflow-y: auto;
        /* Allow scrolling if content is too tall */
    }

    .fullscreen-confirmation-content {
        width: 100%;
        max-width: 90%;
        /* Limit width to 90% of screen on mobile */
        margin: auto 0;
        /* Center vertically when smaller than viewport */
        max-height: 90dvh;
        /* Use 90dvh to account for browser chrome */
        overflow-y: auto;
        /* Allow scrolling within the modal */
    }

    .fullscreen-confirmation-header {
        padding: 30px 20px 15px 20px;
    }

    .fullscreen-confirmation-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .fullscreen-confirmation-title {
        font-size: 1.5rem;
    }

    .fullscreen-confirmation-body {
        padding: 20px;
    }

    .fullscreen-confirmation-message {
        font-size: 1.1rem;
    }

    .fullscreen-confirmation-actions {
        padding: 15px 20px 30px 20px;
        flex-direction: column;
    }

    .fullscreen-confirmation-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
    }

    /* Compact mobile styles for delete/confirmation modals only */
    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-header {
        padding: 16px 12px 8px 12px;
    }

    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-icon {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }

    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-title {
        font-size: 1.2rem;
    }

    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-body {
        padding: 12px;
    }

    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-message {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-actions {
        padding: 8px 12px 16px 12px;
    }

    .fullscreen-confirmation-overlay.compact-mobile .fullscreen-confirmation-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

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

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

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

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--space-xs);
}

.mb-2 {
    margin-bottom: var(--space-sm);
}

.mb-3 {
    margin-bottom: var(--space-md);
}

.mb-4 {
    margin-bottom: var(--space-lg);
}

.mb-5 {
    margin-bottom: var(--space-xl);
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--space-xs);
}

.mt-2 {
    margin-top: var(--space-sm);
}

.mt-3 {
    margin-top: var(--space-md);
}

.mt-4 {
    margin-top: var(--space-lg);
}

.mt-5 {
    margin-top: var(--space-xl);
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }
}