/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow: hidden;
    height: 100vh;
    /* Prevent zoom on mobile */
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* App Layout - Flexbox Pattern */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Persistent Header */
#main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #eb9d41, #f0a648);
    color: white;
    padding: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    width: 100%;
    z-index: 1000;
    min-height: 56px;
    max-height: 56px;
    overflow: hidden;
}

.header-left {
    width: 120px;
    display: flex;
    justify-content: flex-start;
    gap: 0.25rem;
    min-height: 40px;
    align-items: center;
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-center h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-right {
    width: 120px;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
    min-height: 40px;
    flex-shrink: 0;
    overflow: hidden;
}

/* Content Area Management */
#content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    opacity: 0;
    visibility: hidden;
    transform: translateX(0);
    transition: all 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1rem 2rem 1rem;
    box-sizing: border-box;
}

/* People view - warm orange theme */
#people-content {
    background-color: #f5f5f5;
}

/* Tasks view - cool blue theme */
#tasks-content {
    background-color: #f0f7ff;
}

.content.active {
    opacity: 1;
    visibility: visible;
}

/* Project selector specific animations */
#project-selector-content {
    transform: translateX(-100%);
}

#project-selector-content.active {
    transform: translateX(0);
}

/* Header */
header {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.welcome {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.welcome h2 {
    color: #2196F3;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.welcome p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}


.action-button {
    background: linear-gradient(135deg, #eb9d41, #d4872f);
    color: white;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(235, 157, 65, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Status section */
.status {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

#status-text {
    color: #4CAF50;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Mobile optimization */
@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }
    
    .welcome {
        padding: 1.5rem;
        margin: 0 0.5rem 1.5rem;
    }
    
    .status {
        margin: 0 0.5rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 200px;
    }
}

/* iOS specific styles */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Header Layout */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

header h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    min-width: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    min-width: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.save-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    min-width: auto;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#download-csv-btn {
    background: rgba(255,255,255,0.9) !important;
    color: #eb9d41 !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    font-weight: 600;
}

#download-csv-btn:hover {
    background: white !important;
    color: #d4872f !important;
}

.delete-project-btn {
    background: #e53e3e !important;
    color: white !important;
    border: 2px solid #c53030 !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.delete-project-btn:hover {
    background: #c53030 !important;
    border-color: #9c2626 !important;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
    transform: translateY(-1px);
}

.danger-section {
    border: 2px solid #ffebee !important;
    background: #fafafa !important;
}

.danger-warning {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* Lists */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.person-item, .task-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
}

/* People items - orange accents */
.person-item {
    border-left: 4px solid #eb9d41;
}

.person-item:hover {
    border-left: 4px solid #d4872f;
}

/* Task items - blue accents */
.task-item {
    border-left: 4px solid #2196F3;
}

.task-item:hover {
    border-left: 4px solid #1976D2;
}

.person-item.active {
    background: linear-gradient(135deg, #E8F5E8, #F0F8F0);
    border-left: 4px solid #4CAF50;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
}

.person-item:hover, .task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.person-item.active:hover {
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.3);
}

.person-info, .task-info {
    flex: 1;
}

.person-name, .task-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.person-status, .task-status {
    color: #666;
    font-size: 0.9rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 1rem;
}

.status-idle {
    background-color: #ccc;
}

.status-active {
    background-color: #4CAF50;
    animation: pulse 2s infinite;
}

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

/* Note Item Styling - extends person-item for exact same dimensions */
.note-item {
    /* Inherit ALL person-item styling first */
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
    
    /* Then override only the visual differences */
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-left: 4px solid #6c757d;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.note-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, #e9ecef, transparent);
}

.note-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border-left-color: #495057;
}

.note-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.note-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.note-text {
    flex: 1;
}

.note-title {
    font-weight: 600;
    font-size: 1rem;
    color: #495057;
    margin-bottom: 0.1rem;
}

.note-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.note-action {
    font-size: 1.4rem;
    color: #6c757d;
    font-weight: 300;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.note-item:hover .note-action {
    opacity: 1;
    color: #495057;
}

/* Current Task Display */
.current-task {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    display: none;
}

.current-task.active {
    display: block;
}

.current-task h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.current-task .time {
    font-size: 0.9rem;
    opacity: 0.9;
}

.current-task .stop-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    margin-top: 1rem;
    cursor: pointer;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
}

.welcome-icon {
    margin-bottom: 0.5rem;
    text-align: center;
}

.welcome-icon img {
    width: 140px;
    height: auto;
    max-width: 160px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.welcome-icon img:hover {
    opacity: 1;
}

.empty-state h2 {
    color: #eb9d41;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Task Actions */
.task-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

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

.modal h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.modal input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.modal input:focus {
    outline: none;
    border-color: #eb9d41;
}

.modal textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 1.5rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.modal textarea:focus {
    outline: none;
    border-color: #eb9d41;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.cancel-btn {
    background: #ccc;
    color: #333;
    min-width: 80px;
    padding: 12px 16px;
    font-size: 0.9rem;
}

.modal .save-btn {
    background: linear-gradient(135deg, #eb9d41, #d4872f);
    color: white;
    min-width: 120px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

/* Note Screen */
.note-container {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

#note-textarea {
    flex: 1;
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}

#note-textarea:focus {
    border-color: #eb9d41;
}

/* Mobile optimization */
@media (max-width: 480px) {
    
    main {
        padding: 1rem 0.5rem;
    }
    
    .person-item, .task-item {
        padding: 0.75rem;
        margin: 0 0.5rem;
    }
    
    .note-item {
        padding: 0.75rem;
        margin: 1rem 0.5rem 0 0.5rem;
    }
    
    .current-task {
        margin: 0 0.5rem 2rem;
        padding: 1rem;
    }
    
    .task-actions {
        padding: 0 0.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    header {
        padding: 1rem 0.5rem;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
    
    .icon-btn, .back-btn {
        padding: 8px;
        font-size: 1rem;
    }
    
    /* Specific fixes for mobile Safari */
    #main-header {
        padding: 0.5rem;
        min-height: 56px;
        max-height: 56px;
    }
    
    .header-left {
        width: 90px;
    }
    
    .header-right {
        width: 90px;
        overflow: visible;
    }
    
    .header-center h1 {
        font-size: 1rem;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .save-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        max-width: 70px;
    }
    
    .button-icon {
        width: 22px;
        height: 22px;
    }
}

/* Project Management Styles */
.project-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border-left: 4px solid #eb9d41;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.project-icon {
    flex-shrink: 0;
}

.project-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.project-item.current {
    background: linear-gradient(135deg, #fdf3e3, #fef8f0);
    border-left: 4px solid #d4872f;
    box-shadow: 0 4px 20px rgba(235, 157, 65, 0.2);
}

.project-info {
    flex: 1;
}

.project-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.project-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.project-meta {
    font-size: 0.8rem;
    color: #999;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.config-project-btn {
    background: rgba(235, 157, 65, 0.1);
    color: #eb9d41;
    border: 1px solid rgba(235, 157, 65, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    min-width: auto;
    transition: all 0.2s ease;
}

.config-project-btn:hover {
    background: rgba(235, 157, 65, 0.2);
    border-color: #eb9d41;
}

.button-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}

/* Configuration Styles */
.config-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.config-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.config-section h3 {
    color: #eb9d41;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #fdf3e3;
    padding-bottom: 0.5rem;
}

.config-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.config-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e9ecef;
}

.config-item input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    flex: 1;
    margin-right: 1rem;
}

.config-item input:focus {
    background: white;
    border-radius: 4px;
    padding: 0.25rem;
}

.config-actions {
    display: flex;
    gap: 0.5rem;
}

.delete-btn {
    background: white;
    color: #f44336;
    border: 1px solid #f44336;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    min-width: auto;
    max-width: 80px;
    flex-shrink: 0;
    white-space: nowrap;
}

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

/* Mobile optimization for config */
@media (max-width: 480px) {
    .config-sections {
        gap: 1.5rem;
    }
    
    .config-section {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .config-item {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .config-item input {
        margin-right: 0.5rem;
        flex: 1;
        min-width: 0;
    }
    
    .config-actions {
        flex-shrink: 0;
    }
    
    .delete-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
        max-width: 60px;
    }
}

/* Export Styles */
.export-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.export-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.export-section h3 {
    color: #eb9d41;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #fdf3e3;
    padding-bottom: 0.5rem;
}

.export-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.export-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.export-stat {
    background: #fdf3e3;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    border: 1px solid #f0e6d2;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #eb9d41;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.export-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.export-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.export-table th {
    background: #eb9d41;
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border: none;
}

.export-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.export-table tr:nth-child(even) {
    background: #f8f9fa;
}

.export-table tr:hover {
    background: #fdf3e3;
}


/* Mobile optimization for export */
@media (max-width: 480px) {
    .export-sections {
        gap: 1.5rem;
    }
    
    .export-section {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .export-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .export-table {
        font-size: 0.8rem;
    }
    
    .export-table th,
    .export-table td {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) and (max-width: 480px) {
    #main-header {
        padding: 0.5rem;
        min-height: 56px;
        max-height: 56px;
    }
    
    .header-left {
        width: 65px;
        gap: 0.125rem;
    }
    
    .header-right {
        width: 65px;
        gap: 0.125rem;
    }
    
    .header-center h1 {
        font-size: 0.95rem;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        padding: 4px;
    }
    
    .save-btn {
        padding: 2px 4px;
        font-size: 0.6rem;
        max-width: 55px;
        min-width: 50px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #download-csv-btn {
        max-width: 65px !important;
        min-width: 60px !important;
        font-size: 0.6rem !important;
        padding: 3px 6px !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }
    
    .button-icon {
        width: 22px;
        height: 22px;
    }
    
    .back-btn {
        width: 32px;
        height: 32px;
        padding: 4px;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Configuration specific fixes for iOS Safari */
    .config-item {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
    }
    
    .config-item input {
        flex: 1;
        min-width: 0;
        margin-right: 0.25rem;
    }
    
    .delete-btn {
        padding: 0.15rem 0.3rem;
        font-size: 0.65rem;
        max-width: 50px;
        min-width: 50px;
    }
}

/* Actions Menu Styles */
.actions-menu {
    position: absolute;
    top: 50px;
    right: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    z-index: 2000;
    min-width: 160px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

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

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item.danger:hover {
    background-color: #ffeaea;
    color: #e53e3e;
}

.menu-icon {
    margin-right: 12px;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.menu-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-item.danger .menu-text {
    color: #e53e3e;
}

/* Mobile optimization for actions menu */
@media (max-width: 480px) {
    .actions-menu {
        top: 45px;
        right: 5px;
        min-width: 140px;
    }
    
    .menu-item {
        padding: 10px 12px;
    }
    
    .menu-icon {
        margin-right: 8px;
        width: 16px;
        font-size: 0.9rem;
    }
    
    .menu-text {
        font-size: 0.85rem;
    }
}

/* Safe area for devices with notches */
@supports (padding: max(0px)) {
    header {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
    
    main {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    
    .note-container {
        height: calc(100vh - 120px - env(safe-area-inset-bottom));
    }
}
