:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --bg-color: #f5f9fa;
    --container-bg: #ffffff;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #d1ecf1;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--secondary-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background-color: var(--bg-color);
    font-size: 16px;
}

h1, h2, h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

h1 {
    font-size: 28px;
    text-align: center;
    margin: 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

/* Align titles with buttons */
#livestock-inventory-header {
    margin: 0;
    line-height: 1.2;
}

/* Align AquaNotes title with button */
#notes h2 {
    margin: 0 !important;
    line-height: 1.2 !important;
}

.container {
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transition);
}

/* Tabs styling */
.tab-container {
    display: flex;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 5px;
    border-radius: var(--border-radius);
    background-color: #e0f0f5;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tab {
    padding: 12px 20px;
    background-color: #e0f0f5;
    cursor: pointer;
    border-radius: var(--border-radius);
    margin-right: 0;
    transition: var(--transition);
    flex: 1;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.tab:hover {
    background-color: #c0e0f0;
    transform: translateY(-2px);
}

.tab.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: var(--transition);
}

.tab-text {
    font-size: 14px;
    font-weight: inherit;
}

/* Tab hover effects */
.tab:hover .tab-icon {
    transform: scale(1.1);
}

.tab.active .tab-icon {
    transform: scale(1.05);
}

/* Mobile responsive tabs */
@media screen and (max-width: 768px) {
    .tab {
        padding: 10px 12px;
        gap: 6px;
        min-height: 44px;
    }
    
    .tab-icon {
        width: 22px;
        height: 22px;
    }
    
    .tab-text {
        font-size: 12px;
    }
    
    /* On very small screens, show only icons */
    @media screen and (max-width: 480px) {
        .tab-text {
            display: none;
        }
        
        .tab {
            padding: 12px;
            gap: 0;
        }
        
        .tab-icon {
            width: 28px;
            height: 28px;
        }
    }
}

.content {
    display: none;
}

.content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form elements styling */
select, input, textarea, button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-family: var(--font-main);
    font-size: 16px;
    transition: var(--transition);
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    padding: 12px 20px;
    border-radius: var(--border-radius);
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Table styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f9f9f9;
}

/* Responsive table */
@media screen and (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Chart styling */
canvas {
    max-width: 100%;
    margin-top: 20px;
    border-radius: var(--border-radius);
}

#chart-container {
    height: 400px;
    margin-top: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
}

/* Alert and notification styling */
.alert {
    padding: 12px 15px;
    background-color: #d4edda;
    color: #155724;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s forwards;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.info-box {
    background-color: var(--info-color);
    border-left: 5px solid #0c5460;
    color: #0c5460;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Loading spinner */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* View toggle styling */
.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    background-color: white;
    color: #666;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.view-btn.active-view {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.view-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.active-view {
    background-color: var(--primary-dark);
    color: white;
    font-weight: bold;
}

.report-view-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

/* Confirmation dialog styling */
.confirmation-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.confirmation-header h3 {
    color: var(--success-color);
    margin-bottom: 15px;
    font-size: 20px;
}

.confirmation-body p {
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirmation-footer {
    display: flex;
    justify-content: center;
}

.confirmation-ok-btn {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.confirmation-ok-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Error display */
#error-display {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: none;
    box-shadow: var(--box-shadow);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 20px auto;
    padding: 25px;
    border: 1px solid #eee;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Action buttons in table */
.action-buttons {
    display: flex;
    gap: 8px;
}

.edit-btn {
    background-color: var(--warning-color);
    padding: 8px 12px;
    font-size: 0.9em;
    flex: 1;
    border-radius: var(--border-radius);
}

.delete-btn {
    background-color: var(--danger-color);
    padding: 8px 12px;
    font-size: 0.9em;
    flex: 1;
    border-radius: var(--border-radius);
}

/* LIVESTOCK MANAGEMENT SPECIFIC STYLES */

/* Livestock filter controls */
.livestock-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.livestock-filters .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.livestock-filters button {
    flex-shrink: 0;
    height: fit-content;
    margin-bottom: 0;
    white-space: nowrap;
}

/* Livestock table photo column */
.livestock-photo {
    width: 60px;
    text-align: center;
}

.livestock-photo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.livestock-photo-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    border: 2px solid #ddd;
    margin: 0 auto;
}

/* Livestock modal styles */
#livestock-modal .modal-content {
    max-width: 600px;
}

#livestock-form .form-group {
    margin-bottom: 15px;
}

#livestock-form input[type="file"] {
    padding: 8px;
}

#current-photo {
    margin-top: 10px;
    text-align: center;
}

#current-photo img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#current-photo p {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Death fields styling */
#death-fields {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 10px 0;
}

#death-fields .form-group {
    margin-bottom: 15px;
}

#death-fields .form-group:last-child {
    margin-bottom: 0;
}

/* Status indicators in livestock table */
.status-live {
    color: var(--success-color);
    font-weight: bold;
}

.status-deceased {
    color: var(--danger-color);
    font-weight: bold;
}

/* Livestock table responsive adjustments */
@media screen and (max-width: 768px) {
    .livestock-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .livestock-filters .form-group {
        min-width: 100%;
    }
    
    .livestock-filters button {
        width: 100%;
    }
    
    /* Hide some columns on mobile */
    #livestock-table th:nth-child(3),
    #livestock-table td:nth-child(3),
    #livestock-table th:nth-child(4),
    #livestock-table td:nth-child(4) {
        display: none;
    }
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .container {
        padding: 15px;
    }
    
    .tab {
        padding: 10px;
        font-size: 14px;
    }
    
    .form-group > div {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    #chart-container {
        height: 300px;
    }
    
    .modal-content {
        margin: 20px auto;
        width: 95%;
        padding: 20px;
    }
}

/* Date range container */
.date-range-container {
    display: flex;
    gap: 10px;
}

@media screen and (max-width: 768px) {
    .date-range-container {
        flex-direction: column;
        gap: 0;
    }
}

/* Logo styling */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    font-size: 0; /* Remove whitespace between inline span elements */
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.logo span {
    color: var(--secondary-color);
}

/* Specific logo text styling - override default span color */
.logo-container .logo .logo-aqua {
    color: #3498db !important; /* Light blue - force override */
    font-size: 32px; /* Restore font size */
    margin: 0;
    padding: 0;
    font-weight: inherit;
    letter-spacing: 0;
    word-spacing: 0;
}

.logo-container .logo .logo-george {
    color: #000000 !important; /* Black - force override */
    font-size: 32px; /* Restore font size */
    margin: 0;
    padding: 0;
    font-weight: inherit;
    letter-spacing: 0;
    word-spacing: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 16px;
    opacity: 0.7;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Logo hover effect */
.logo:hover .logo-icon,
.logo:hover .logo-image {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Logo click rotation animation */
.logo-image.rotating {
    animation: logoSpin 0.8s ease-in-out;
}

@keyframes logoSpin {
    from {
        transform: rotate(0deg) scale(1.1);
    }
    to {
        transform: rotate(360deg) scale(1.1);
    }
}

/* Responsive logo adjustments */
@media screen and (max-width: 768px) {
    .logo {
        font-size: 24px;
        gap: 8px;
        padding: 8px 16px;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .logo-image {
        width: 80px;
        height: 80px;
    }
}

/* AquaAI Chat Styles */
#aquaai-chat-container {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    height: 500px;
    display: flex;
    flex-direction: column;
}

#aquaai-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
}

.chat-input-container {
    display: flex;
    padding: 15px;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
}

#aquaai-input {
    flex-grow: 1;
    margin-right: 10px;
    resize: none;
    height: 100px;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
}

.chat-message.user {
    background-color: #e6f2ff;
    text-align: right;
}

.chat-message.assistant {
    background-color: #f0f0f0;
}

.chat-message.assistant p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.chat-message.assistant p:last-child {
    margin-bottom: 0;
}

.chat-message.assistant ul {
    margin: 10px 0;
    padding-left: 20px;
}

.chat-message.assistant li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.chat-message.assistant strong {
    font-weight: bold;
    color: var(--secondary-color);
}

.chat-message.assistant em {
    font-style: italic;
}

.aquaai-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Additional action button styling for consistency */
.action-buttons {
    display: flex;
    gap: 5px;
}

.edit-btn, .delete-btn {
    padding: 5px 10px;
    font-size: 0.8em;
}

.edit-btn {
    background-color: var(--warning-color);
}

.delete-btn {
    background-color: var(--danger-color);
}

/* Modal styling refinements */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    display: none;
}

.modal-content {
    background-color: #fefefe;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: var(--border-radius);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: black;
}

/* Livestock specific form styling */
#livestock-form button {
    margin-bottom: 0;
}

#livestock-form .form-group:last-child {
    margin-bottom: 20px;
}

/* Required field indicator */
label:after {
    content: "";
}

label[for$="fish-name"]:after,
label[for$="type"]:after,
label[for$="date-purchase"]:after,
label[for$="status"]:after,
label[for$="aquarium"]:after {
    content: " *";
    color: var(--danger-color);
}

/* Success button styling */
button.success-btn {
    background-color: var(--success-color);
}

button.success-btn:hover {
    background-color: #27ae60;
}

/* Livestock table enhancements */
#livestock-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.empty-state::before {
    content: "🐠";
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Responsive Add New button styles */
@media (max-width: 768px) {
    .add-button-text {
        display: none;
    }
    
    .add-button-icon {
        display: inline !important;
        font-size: 20px;
        font-weight: bold;
    }
    
    /* Adjust button padding for mobile */
    button[onclick="showAddLivestockModal()"] {
        padding: 5px 12px 8px 12px !important;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Also apply to notes button */
    button[onclick="showAddNoteModal()"] {
        padding: 5px 12px 8px 12px !important;
        min-width: 44px;
        min-height: 44px;
    }
}

/* ===== NOTE COLOR SELECTION STYLES ===== */

/* Color selection radio button styling */
input[name="note-color"]:checked + div {
    border-color: #333 !important;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.3);
    transform: scale(1.1);
}

input[name="note-color"]:hover + div {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===== NOTE CONTENT FADE EFFECT ===== */

/* Fade overlay for truncated content */
.note-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

/* Hover effects for clickable content */
.note-content:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.note-click-hint {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.note-click-hint:hover {
    opacity: 1;
}

/* Adjust fade overlay for different note colors */
.note-card.color-yellow .note-fade-overlay {
    background: linear-gradient(transparent, rgba(255, 235, 59, 0.9));
}

.note-card.color-blue .note-fade-overlay {
    background: linear-gradient(transparent, rgba(66, 165, 245, 0.9));
}

.note-card.color-green .note-fade-overlay {
    background: linear-gradient(transparent, rgba(102, 187, 106, 0.9));
}

.note-card.color-pink .note-fade-overlay {
    background: linear-gradient(transparent, rgba(236, 64, 122, 0.9));
}

.note-card.color-orange .note-fade-overlay {
    background: linear-gradient(transparent, rgba(255, 167, 38, 0.9));
}

/* ===== NOTE FULL VIEW MODAL STYLES ===== */

/* Close button hover effect for full view modal */
#note-full-view-modal .close-modal:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Responsive adjustments for full view modal */
@media (max-width: 768px) {
    #note-full-view-modal {
        padding: 10px !important;
    }
    
    #note-full-view-modal .modal-content {
        max-width: 100% !important;
        max-height: 95vh !important;
    }
    
    #note-full-view-modal h2 {
        font-size: 24px !important;
        padding-right: 50px !important;
    }
}

/* ===== STICKY NOTES STYLES ===== */

/* Notes Grid */
#notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Individual Note Card */
.note-card {
    position: relative;
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-family: var(--font-main);
    border: 3px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    word-wrap: break-word;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Sticky Note Colors */
.note-card.color-yellow {
    background-color: #FFEB3B;
    border-color: #FBC02D;
}

.note-card.color-blue {
    background-color: #42A5F5;
    border-color: #1976D2;
    color: white;
}

.note-card.color-green {
    background-color: #66BB6A;
    border-color: #388E3C;
    color: white;
}

.note-card.color-pink {
    background-color: #EC407A;
    border-color: #C2185B;
    color: white;
}

.note-card.color-orange {
    background-color: #FFA726;
    border-color: #F57C00;
    color: white;
}

/* Pinned Note Styling */
.note-card.pinned {
    border-width: 4px;
    border-style: double;
}

.note-card.pinned::before {
    content: "📌";
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 16px;
    z-index: 10;
}

/* Note Title */
.note-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 0;
    line-height: 1.3;
    word-break: break-word;
}

.note-card.pinned .note-title {
    margin-left: 25px; /* Make room for pin icon */
}

/* Note Content */
.note-content {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

/* Note References */
.note-references {
    margin-bottom: 10px;
    font-size: 12px;
    opacity: 0.8;
}

.note-reference {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* Note Footer */
.note-footer {
    font-size: 11px;
    opacity: 0.7;
    font-style: italic;
    margin-top: auto;
    text-align: right;
}

/* Note Actions */
.note-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    gap: 5px;
    z-index: 10;
}

.note-card:hover .note-actions {
    display: flex;
}

.note-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

.note-action-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.note-action-btn.pin-btn.pinned {
    background-color: #ff9800;
    color: white;
}

.note-action-btn.edit-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.note-action-btn.delete-btn:hover {
    background-color: var(--danger-color);
    color: white;
}

/* Pin Button */
.pin-btn {
    font-size: 14px;
}

/* Note Card Layout */
.note-card {
    display: flex;
    flex-direction: column;
}

/* Random Rotation Effect for Authentic Look */
.note-card:nth-child(3n+1) {
    transform: rotate(-1deg);
}

.note-card:nth-child(3n+2) {
    transform: rotate(1deg);
}

.note-card:nth-child(3n+3) {
    transform: rotate(-0.5deg);
}

.note-card:hover {
    transform: rotate(0deg) translateY(-2px) !important;
}

/* Search Box Styling */
#notes-search {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#notes-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* Notes Count Display */
#notes-count {
    font-weight: 500;
}

/* Empty State Styling */
#notes-empty-state,
#notes-no-results {
    opacity: 0.7;
}

/* Color Picker in Modal */
input[type="radio"][name="note-color"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

input[type="radio"][name="note-color"]:checked + label div {
    border-color: var(--primary-color) !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* Title Counter */
#title-counter {
    transition: color 0.3s ease;
}

#title-counter.warning {
    color: var(--warning-color) !important;
}

#title-counter.danger {
    color: var(--danger-color) !important;
}

/* Responsive Notes Grid */
@media (max-width: 768px) {
    #notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .note-card {
        min-height: 180px;
        padding: 12px;
    }
    
    .note-title {
        font-size: 15px;
    }
    
    .note-content {
        font-size: 13px;
    }
}

/* ===== HAMBURGER MENU STYLES ===== */

/* Update logo container to flex layout */
.logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px 0 0;
    margin: -15px -15px 10px -15px;
}

/* Hamburger Menu */
.hamburger-menu {
    position: relative;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 22px 10px 8px 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
}

/* Hamburger Dropdown */
.hamburger-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.hamburger-dropdown.show {
    display: block;
}

/* Hamburger Menu Items */
.hamburger-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.hamburger-item:last-child {
    border-bottom: none;
}

.hamburger-item:hover {
    background-color: #f8f9fa;
}

.hamburger-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.hamburger-item span {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Hamburger Divider */
.hamburger-divider {
    height: 1px;
    background-color: #ddd;
    margin: 8px 0;
}

/* User Info in Hamburger Menu */
.hamburger-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 8px 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar svg {
    width: 20px;
    height: 20px;
    color: white;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Logout Item Styling */
.logout-item {
    color: var(--danger-color) !important;
}

.logout-item:hover {
    background-color: #ffeaea !important;
    color: var(--danger-color) !important;
}

.logout-item .hamburger-item-icon {
    color: var(--danger-color) !important;
}

/* User Management Modal Styles */
.user-management-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.users-table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.users-table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1;
}

.users-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.users-table tr:hover {
    background-color: #f8f9fa;
}

.role-badge, .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.role-admin {
    background-color: #e3f2fd;
    color: #1976d2;
}

.role-user {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.status-active {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.status-inactive {
    background-color: #ffebee;
    color: #c62828;
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

/* Hide mobile email by default (desktop) */
.email-mobile {
    display: none;
}

/* Mobile responsive user management */
@media (max-width: 768px) {
    .users-table-container {
        overflow-x: auto;
    }
    
    .users-table {
        min-width: 100%;
        font-size: 14px;
    }
    
    /* Hide less important columns on mobile */
    .users-table th:nth-child(2), /* Email */
    .users-table td:nth-child(2),
    .users-table th:nth-child(5), /* Last Login */
    .users-table td:nth-child(5) {
        display: none;
    }
    
    /* Reduce padding on mobile */
    .users-table th,
    .users-table td {
        padding: 8px 6px;
    }
    
    /* Stack user info vertically in username cell */
    .users-table td:first-child {
        position: relative;
        padding-bottom: 12px;
    }
    
    /* Center the Add User button */
    .user-management-controls {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    /* Make action buttons smaller */
    .users-table .btn {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    /* Add responsive modal sizing */
    .modal-content {
        margin: 10px;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    /* Mobile user info layout */
    .user-info-mobile .username {
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    .user-info-mobile .email-mobile {
        font-size: 12px;
        color: #666;
        display: block;
    }
}

/* Setup Modal Specific Styles */
.setup-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.setup-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.setup-table th,
.setup-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.setup-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.setup-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.setup-table button {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.setup-table button:hover {
    background-color: #27ae60;
}

/* Override for edit and delete buttons in setup table */
.setup-table .edit-btn {
    background-color: var(--warning-color);
}

.setup-table .edit-btn:hover {
    background-color: #e67e22;
}

.setup-table .delete-btn {
    background-color: var(--danger-color);
}

.setup-table .delete-btn:hover {
    background-color: #c0392b;
}

/* About Modal Specific Styles */
#about-modal .modal-content {
    max-width: 500px;
}

/* Mobile Responsive Hamburger */
@media (max-width: 768px) {
    /* Adjust logo container for mobile body padding */
    .logo-container {
        margin: -10px -10px 10px -10px;
    }
    
    .hamburger-dropdown {
        min-width: 200px;
        right: -10px;
    }
    
    .hamburger-item {
        padding: 14px 16px;
    }
    
    .hamburger-item span {
        font-size: 15px;
    }
    
    .setup-modal-content {
        max-width: 95vw;
        margin: 20px auto;
    }
    
    .setup-table {
        font-size: 14px;
    }
    
    .setup-table th,
    .setup-table td {
        padding: 6px 8px;
    }
}

/* ===== FLOATING ACTION BUTTON (FAB) STYLES ===== */

.quick-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.fab {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
}

.fab:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}