/* Modal Component - Shared across all pages */

.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-wide {
    max-width: 900px;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

/* Fixed Header */
.modal-header-fixed {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e5e5;
    color: #333;
}

/* Scrollable Content */
.modal-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Fixed Footer */
.modal-footer-fixed {
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.modal-footer-fixed .btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-cancel:hover {
    background: #e5e5e5;
    color: #333;
}

.btn-save {
    background: #EC4899;
    color: white;
}

.btn-save:hover {
    background: #DB2777;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-save:disabled {
    background: #9CA3AF;
    color: #D1D5DB;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-save:disabled:hover {
    background: #9CA3AF;
    transform: none;
    box-shadow: none;
}

.btn-delete {
    background: #EF4444;
    color: white;
}

.btn-delete:hover {
    background: #DC2626;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary);
    font-size: 14px;
}

.required {
    color: #EF4444;
    font-weight: 700;
}

/* Primary field (Title) */
.form-group-primary label {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.form-group-primary input {
    font-size: 16px !important;
    font-weight: 500;
    padding: 12px 14px !important;
    border: 2px solid #e5e5e5 !important;
}

.form-group-primary input:focus {
    border-color: var(--primary) !important;
}

/* Important field (Date) */
.form-group-important label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Secondary field (Description) */
.form-group-secondary label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}



.form-group-secondary textarea {
    font-size: 13px !important;
    color: #666;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Collapse Toggle (New Design) */
.collapse-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin: 16px 0 0 0;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.2s;
}

.collapse-toggle:hover {
    background: linear-gradient(135deg, #f0f1f3 0%, #e8e9eb 100%);
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.collapse-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapse-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #EC4899, #DB2777);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.collapse-icon-secondary {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.collapse-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.collapse-chevron {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s, color 0.2s;
}

.collapse-chevron.rotated {
    transform: rotate(180deg);
    color: #1a1a1a;
}

.collapse-content {
    display: none;
    margin-top: 12px;
    padding: 16px;
    background: #fafbfc;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

/* Notification Add Form */
.notification-add-form {
    background: white;
    padding: 14px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    margin-bottom: 14px;
}

.notification-add-form .form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

.notification-add-form select,
.notification-add-form input[type="time"] {
    font-size: 13px;
    padding: 8px 10px;
}

.btn-add-notification {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #EC4899, #DB2777);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-notification:hover {
    background: linear-gradient(135deg, #DB2777, #BE185D);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Priority Toggle Switch (Inline) */
.priority-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.priority-checkbox-inline input[type="checkbox"] {
    appearance: none;
    width: 41px;
    height: 22px;
    background: #e5e5e5;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    border: unset !important
}

.priority-checkbox-inline input[type="checkbox"]:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.priority-checkbox-inline input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.priority-checkbox-inline input[type="checkbox"]:checked:before {
    left: 20px;
}

.priority-checkbox-inline i {
    font-size: 13px;
    color: #F59E0B;
    transition: all 0.2s;
}

.priority-checkbox-inline input[type="checkbox"]:checked ~ i {
    transform: scale(1.1);
}

.priority-checkbox-inline span {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.collapse-icon-recurring {
    background: linear-gradient(135deg, #10B981, #059669);
}

/* Event Modal Two-Column Layout */
.event-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.event-form-main {
    min-width: 0;
}

.event-form-options {
    min-width: 0;
    padding-bottom: 20px;
}

/* Advanced Options Toggle (Legacy - keep for compatibility) */
.advanced-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    user-select: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.advanced-toggle:hover {
    color: #333;
}

.advanced-toggle i {
    font-size: 12px;
    transition: transform 0.3s;
}

.advanced-toggle i.rotated {
    transform: rotate(180deg);
}

/* Compact Options */
.compact-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 0;
}

.compact-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.compact-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.compact-checkbox span {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.compact-checkbox span i {
    font-size: 13px;
    color: var(--primary);
}

/* Weekdays Grid */
.weekdays-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.weekday-label {
    position: relative;
    cursor: pointer;
}

.weekday-label input {
    position: absolute;
    opacity: 0;
}

.weekday-label span {
    display: block;
    padding: 8px;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.weekday-label input:checked + span {
    background: #1a1a1a;
    color: white;
    border-color: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal,
    .modal-wide {
        max-width: 100%;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .modal-overlay {
        padding: 0;
    }

    /* Event modal - stack columns on mobile */
    .event-modal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .modal-title {
        font-size: 16px;
    }

    .modal-close {
        width: 30px;
        height: 30px;
    }

    .modal-content-scroll {
        padding: 20px;
    }

    .modal-footer-fixed {
        padding: 14px 20px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group-primary label {
        font-size: 14px;
    }

    .form-group-primary input {
        font-size: 15px !important;
        padding: 11px 12px !important;
    }

    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"],
    .form-group input[type="number"],
    .form-group textarea,
    .form-group select {
        padding: 9px 11px;
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .compact-options {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

    .compact-checkbox {
        font-size: 13px;
    }

    .weekdays-grid {
        gap: 5px;
    }

    .weekday-label span {
        padding: 7px;
        font-size: 11px;
    }

    /* Collapse sections responsive */
    .collapse-toggle {
        padding: 10px 12px;
        margin: 14px 0 0 0;
    }

    .collapse-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .collapse-title {
        font-size: 13px;
    }

    .collapse-content {
        padding: 14px;
        margin-top: 10px;
    }

    .notification-add-form {
        padding: 12px;
    }

    .btn-add-notification {
        padding: 9px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .modal,
    .modal-wide {
        max-width: 100%;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    /* Event modal - stack columns on small screens */
    .event-modal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-header-fixed {
        padding: 14px 16px;
    }

    .modal-title {
        font-size: 15px;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .modal-content-scroll {
        padding: 16px;
    }

    .modal-footer-fixed {
        padding: 12px 16px;
        gap: 10px;
    }

    .modal-footer-fixed .btn {
        padding: 11px;
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .form-group-primary label {
        font-size: 13px;
    }

    .form-group-important label {
        font-size: 13px;
    }

    .form-group-secondary label {
        font-size: 11px;
    }

    .form-group-primary input {
        font-size: 14px !important;
        padding: 10px 11px !important;
    }

    .form-group input[type="text"],
    .form-group input[type="date"],
    .form-group input[type="time"],
    .form-group input[type="number"],
    .form-group textarea,
    .form-group select {
        padding: 8px 10px;
        font-size: 13px;
        border-radius: 5px;
    }

    .form-group textarea {
        min-height: 70px;
    }

    .advanced-toggle {
        font-size: 13px;
        padding: 10px 0;
    }

    .compact-options {
        gap: 8px;
        padding: 8px 0;
    }

    .compact-checkbox {
        font-size: 12px;
        gap: 6px;
    }

    .compact-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .weekdays-grid {
        gap: 4px;
        margin-top: 6px;
    }

    .weekday-label span {
        padding: 6px 4px;
        font-size: 10px;
        border-radius: 5px;
    }

    /* Collapse sections responsive - small screens */
    .collapse-toggle {
        padding: 9px 11px;
        margin: 12px 0 0 0;
    }

    .collapse-toggle-left {
        gap: 8px;
    }

    .collapse-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 5px;
    }

    .collapse-title {
        font-size: 12px;
    }

    .collapse-chevron {
        font-size: 11px;
    }

    .collapse-content {
        padding: 12px;
        margin-top: 8px;
        border-radius: 7px;
    }

    .notification-add-form {
        padding: 11px;
        border-radius: 5px;
        margin-bottom: 12px;
    }

    .notification-add-form .form-group label {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .notification-add-form select,
    .notification-add-form input[type="time"] {
        font-size: 12px;
        padding: 7px 9px;
    }

    .btn-add-notification {
        padding: 8px;
        font-size: 12px;
        margin-top: 10px;
        gap: 5px;
    }

    .notifications-list {
        gap: 8px;
    }
}

/* Settings Modal Tabs */
.settings-tab:hover {
    color: #666 !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

.settings-tab.active {
    color: #1a1a1a !important;
    border-bottom-color: #6366F1 !important;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Notifications Tab */


.notifications-header {
    margin-bottom: 14px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #EC4899;
    font-size: 15px;
}

.section-description {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.notifications-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form Section */
.template-form-section {
    background: white;
    border: 2px solid #EC4899;
    padding: 14px;
    border-radius: 8px;
    height: fit-content;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
}

.form-icon {
    width: 28px;
    height: 28px;
    background: #EC4899;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
}

.form-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.template-form-section .form-group {
    margin-bottom: 10px;
}

.template-form-section .form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    display: block;
}

.template-form-section .form-group input,
.template-form-section .form-group select {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
}

.template-form-section .form-group input:focus,
.template-form-section .form-group select:focus {
    outline: none;
    border-color: #EC4899;
}

.form-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.form-actions .btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.form-actions .btn-save {
    flex: 1;
    background: #EC4899;
    color: white;
}

.form-actions .btn-save:hover {
    background: #DB2777;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.form-actions .btn-cancel {
    display: none;
    background: white;
    border: 1px solid #e5e5e5;
    color: #666;
    font-weight: 500;
}

.form-actions .btn-cancel:hover {
    background: #f5f5f5;
}

/* Templates Section */
.templates-section {

}

.templates-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
}

.templates-icon {
    width: 28px;
    height: 28px;
    background: #8B5CF6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
}

.templates-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.templates-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Responsive - Settings Modal */
@media (max-width: 768px) {
    /* Make modal full screen on mobile */
    #notification-settings-modal .modal {
        max-width: 100%;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    /* Tabs */
    .settings-tab {
        font-size: 12px;
        padding: 10px 14px;
    }

    /* Notifications - Stack vertically on mobile */


    .notifications-header {
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 15px;
        gap: 6px;
    }

    .section-title i {
        font-size: 14px;
    }

    .notifications-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* Form Section */
    .template-form-section {
        padding: 12px;
    }

    .form-header {
        gap: 6px;
        margin-bottom: 10px;
    }

    .form-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .form-header h3 {
        font-size: 13px;
    }

    .template-form-section .form-group {
        margin-bottom: 9px;
    }

    .template-form-section .form-group label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .template-form-section .form-group input,
    .template-form-section .form-group select {
        padding: 7px 8px;
        font-size: 13px;
    }

    .form-actions {
        gap: 6px;
        margin-top: 10px;
    }

    .form-actions .btn {
        padding: 7px 10px;
        font-size: 12px;
        gap: 4px;
    }

    /* Templates Section */
    .templates-header {
        gap: 6px;
        margin-bottom: 10px;
    }

    .templates-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .templates-header h3 {
        font-size: 13px;
    }

    .templates-list {
        gap: 7px;
    }
}

@media (max-width: 480px) {
    /* Even smaller on very small screens */
    #notification-settings-modal .modal {
        max-width: 100%;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    /* Tabs */
    .settings-tab {
        font-size: 11px;
        padding: 9px 12px;
    }

    /* Notifications */


    .notifications-header {
        margin-bottom: 10px;
    }

    .section-title {
        font-size: 14px;
        gap: 5px;
    }

    .section-title i {
        font-size: 13px;
    }

    .notifications-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    /* Form Section */
    .template-form-section {
        padding: 10px;
        border-radius: 7px;
    }

    .form-header {
        gap: 5px;
        margin-bottom: 8px;
    }

    .form-icon {
        width: 24px;
        height: 24px;
        font-size: 11px;
        border-radius: 5px;
    }

    .form-header h3 {
        font-size: 12px;
    }

    .template-form-section .form-group {
        margin-bottom: 8px;
    }

    .template-form-section .form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .template-form-section .form-group input,
    .template-form-section .form-group select {
        padding: 6px 8px;
        font-size: 12px;
        border-radius: 5px;
    }

    .form-actions {
        gap: 5px;
        margin-top: 8px;
    }

    .form-actions .btn {
        padding: 7px 10px;
        font-size: 12px;
        gap: 3px;
        border-radius: 5px;
    }

    /* Templates Section */
    .templates-header {
        gap: 5px;
        margin-bottom: 8px;
    }

    .templates-icon {
        width: 24px;
        height: 24px;
        font-size: 11px;
        border-radius: 5px;
    }

    .templates-header h3 {
        font-size: 12px;
    }

    .templates-list {
        gap: 6px;
    }
}

/* Template Items (rendered by JS) */
.template-item {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    padding: 10px;
    transition: all 0.2s;
}

.template-item.template-active {
    border-left: 3px solid #10B981;
}

.template-item.inactive {
    opacity: 0.6;
}

.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.template-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.template-info-wrapper {
    flex: 1;
    min-width: 0;
}

.template-header-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.template-icon {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.template-icon i {
    color: white;
    font-size: 12px;
}

.template-icon-active {
    background: #10B981;
}

.template-icon-inactive {
    background: #9CA3AF;
}

.template-text {
    flex: 1;
    min-width: 0;
}

.template-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 3px;
}

.template-status i {
    font-size: 4px;
}

.status-active {
    background: #D1FAE5;
    color: #065F46;
}

.status-inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.template-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 35px;
}

.template-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
}

.template-detail-item i {
    font-size: 11px;
}

.template-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.template-btn {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.template-btn:hover {
    transform: scale(1.1);
}

.template-btn-toggle {
    background: #f5f5f5;
    font-size: 14px;
}

.btn-toggle-active {
    color: #10B981;
}

.btn-toggle-inactive {
    color: #9CA3AF;
}

.template-btn-edit {
    background: #f5f5f5;
    color: #6366F1;
    font-size: 12px;
}

.template-btn-delete {
    background: #FEE2E2;
    color: #DC2626;
    font-size: 12px;
}

/* Responsive - Template Items */
@media (max-width: 768px) {
    .template-item {
        padding: 9px;
        border-radius: 7px;
    }

    .template-content {
        gap: 8px;
    }

    .template-header-row {
        gap: 6px;
        margin-bottom: 5px;
    }

    .template-icon {
        width: 26px;
        height: 26px;
    }

    .template-icon i {
        font-size: 11px;
    }

    .template-title {
        font-size: 12px;
    }

    .template-status {
        font-size: 9px;
        padding: 2px 4px;
    }

    .template-details {
        gap: 6px;
        padding-left: 32px;
    }

    .template-detail-item {
        font-size: 10px;
        gap: 3px;
    }

    .template-detail-item i {
        font-size: 10px;
    }

    .template-actions {
        gap: 4px;
    }

    .template-btn {
        width: 26px;
        height: 26px;
    }

    .template-btn-toggle {
        font-size: 13px;
    }

    .template-btn-edit,
    .template-btn-delete {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .template-item {
        padding: 8px;
        border-radius: 6px;
    }

    /* Template item hover effects less pronounced on mobile */
    .template-item:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .template-content {
        gap: 7px;
        flex-wrap: wrap;
    }

    .template-info-wrapper {
        flex: 1;
        min-width: 200px;
    }

    .template-header-row {
        gap: 5px;
        margin-bottom: 4px;
    }

    .template-icon {
        width: 24px;
        height: 24px;
        border-radius: 4px;
    }

    .template-icon i {
        font-size: 10px;
    }

    .template-title {
        font-size: 11px;
        margin-bottom: 1px;
    }

    .template-status {
        font-size: 9px;
        padding: 1px 4px;
        gap: 2px;
    }

    .template-status i {
        font-size: 3px;
    }

    .template-details {
        gap: 6px;
        padding-left: 29px;
    }

    .template-detail-item {
        font-size: 10px;
        gap: 3px;
    }

    .template-detail-item i {
        font-size: 9px;
    }

    .template-actions {
        gap: 3px;
    }

    .template-btn {
        width: 26px;
        height: 26px;
        border-radius: 4px;
    }

    .template-btn:hover {
        transform: scale(1.05);
    }

    .template-btn-toggle {
        font-size: 12px;
    }

    .template-btn-edit,
    .template-btn-delete {
        font-size: 10px;
    }
}

.template-info {
    flex: 1;
}

.template-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.template-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
}

.template-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #e5e5e5;
    color: #333;
}

.btn-icon.btn-danger {
    background: #fee;
    color: #c00;
}

.btn-icon.btn-danger:hover {
    background: #fcc;
}
