/* style.css - Complete Styles for Masjid Raya Negara App */

:root {
    --bg-primary: #fbfbfb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e5e5e5;
    --bg-card: #ffffff;
    --text-primary: #2c2c2c;
    --text-secondary: #5a5a5a;
    --text-muted: #7a7a7a;
    --border: #c0c0c0;
    --border-light: #d4d4d4;
    --accent-blue: #2c6cb8;
    --accent-blue-light: #3c7fc8;
    --accent-green: #2e7d32;
    --accent-red: #c62828;
    --accent-orange: #e67e22;
    --accent-hover: #1e5a9e;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 5px rgba(0, 0, 0, 0.1);
    --ribbon-bg: #f7f7f7;
    --ribbon-border: #c0c0c0;
    --ribbon-btn-bg: #fcfcfc;
    --ribbon-btn-hover: #cde8f5;
    --ribbon-btn-active: #b8d4e8;
    --highlight-row: #eaf8ff;
}

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --bg-card: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #909090;
    --border: #4a4a4a;
    --border-light: #3a3a3a;
    --accent-blue: #5c9ce0;
    --accent-blue-light: #6ca8e4;
    --accent-green: #5cb85c;
    --accent-red: #d9534f;
    --accent-orange: #f0ad4e;
    --ribbon-bg: #2a2a2a;
    --ribbon-border: #4a4a4a;
    --ribbon-btn-bg: #3a3a3a;
    --ribbon-btn-hover: #4a6a8a;
    --ribbon-btn-active: #3a5a7a;
    --highlight-row: #232323;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', 'Inter', 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.45;
}

/* Dashboard Styles */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-icon {
    height: 48px;
    width: auto;
    vertical-align: middle;
}

.editor-container .app-icon {
    height: 24px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
}

.dark-mode-toggle,
.install-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--ribbon-btn-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    gap: 8px;
}

.action-bar {
    margin-bottom: 24px;
    display: flex;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-blue);
    border-color: #1a5a9a;
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-light);
}

.table-container {
    background: var(--bg-card);
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.data-table tr:hover {
    background: var(--ribbon-btn-hover);
}

.empty-state {
    text-align: center;
    padding: 48px !important;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    background: var(--ribbon-btn-bg);
    color: var(--text-primary);
}

.action-btn.print {
    background: var(--accent-orange);
    color: white;
}

.action-btn.edit {
    background: var(--accent-green);
    color: white;
}

.action-btn.delete {
    background: var(--accent-red);
    color: white;
}

/* ==================== NEW LAYOUT STYLES ==================== */

/* Top Bar */
.top-bar {
    background: var(--ribbon-bg);
    border-bottom: 1px solid var(--border);
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 101;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-icon-small {
    height: 28px;
    width: auto;
}

.report-date-display {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: monospace;
}

.top-bar-right {
    display: flex;
    gap: 6px;
}

.top-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--ribbon-btn-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.top-bar-btn i {
    font-size: 14px;
}

.top-bar-btn:hover {
    background: var(--ribbon-btn-hover);
    transform: translateY(-1px);
}

/* Hide show button on desktop - will show on mobile via different method */
#toggleSidebarBtn {
    display: flex;
}

/* Ribbon Toolbar - Word 2010 Style */
.ribbon-toolbar {
    background: var(--ribbon-bg);
    border-bottom: 1px solid var(--ribbon-border);
    position: sticky;
    top: 41px;
    z-index: 100;
    transition: all 0.3s ease;
}

.ribbon-toolbar.collapsed {
    display: none;
}

.ribbon-scroll-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 8px 20px;
    gap: 8px;
}

.ribbon-left {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    align-items: stretch;
}

.ribbon-right {
    display: flex;
    gap: 8px;
    align-items: stretch;
    /* border-left: 2px solid var(--border); */
    padding-left: 8px;
    margin-left: 4px;
}

.ribbon-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 0 4px;
    border-right: 1px solid var(--border-light);
}

.ribbon-group:last-child {
    border-right: none;
}

.ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--ribbon-btn-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 60px;
    height: 100%;
    transition: all 0.15s;
}

.ribbon-btn i {
    font-size: 16px;
}

.ribbon-btn span {
    text-align: center;
    line-height: 1.2;
    font-size: 10px;
}

.ribbon-btn:hover {
    background: var(--ribbon-btn-hover);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.ribbon-btn:active {
    transform: translateY(0);
}

.ribbon-btn.success {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.ribbon-btn.primary {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Editor Styles - Original */
.workspace {
    padding: 24px 32px;
    min-height: calc(100vh - 55px);
    overflow-x: auto;
}

.doc-paper {
    max-width: 1100px;
    min-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    padding: 32px 40px;
    border: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-blue);
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 13px;
}

.finance-table th {
    text-align: left;
    padding: 10px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    font-weight: 600;
}

.finance-table td {
    padding: 8px;
    border: 1px solid var(--border-light);
}

.finance-table tbody tr {
    cursor: pointer;
}

.finance-table tbody tr:hover {
    background: var(--ribbon-btn-hover);
}

/* Style for spans in tables - make date look subtle */
.finance-table td span,
#incomeBody td span,
#expendBody td span,
#kasAwalBody td span {
    font-size: 11px;
    font-style: italic;
    color: var(--text-muted);
    font-weight: normal;
    white-space: nowrap;
}

/* Dark mode span styling */
body.dark-mode .finance-table td span,
body.dark-mode #incomeBody td span,
body.dark-mode #expendBody td span,
body.dark-mode #kasAwalBody td span {
    color: #8a8a8a;
}

/* Make sure spans don't break layout */
.finance-table td {
    vertical-align: top;
    word-break: break-word;
}

.finance-table td span {
    display: inline-block;
    margin-left: 4px;
}

/* Table Action Row */
.table-action-row td {
    padding: 8px !important;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border) !important;
}

.table-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.table-add-btn:hover {
    background: var(--accent-blue-light);
    transform: scale(1.02);
}

.total-row {
    background: var(--highlight-row);
}

.total-row td {
    font-weight: 600;
    padding: 12px 8px !important;
}

.dashboard-table * {
    white-space: nowrap;
}

/* Mobile Bottom Toolbar - for mobile only (replaces ribbon) */
.mobile-bottom-toolbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ribbon-bg);
    border-top: 1px solid var(--border);
    padding: 12px 12px;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 55px;
}

.mobile-tool-btn i {
    font-size: 16px;
}

.mobile-tool-btn:hover {
    background: var(--ribbon-btn-hover);
    transform: translateY(-2px);
}

.mobile-tool-btn.success {
    color: var(--accent-green);
}

.mobile-tool-btn.primary {
    color: var(--accent-blue);
}

.mobile-tool-btn:active {
    transform: translateY(0);
}

/* Toggle Button Animation */
#toggleSidebarBtn {
    transition: all 0.2s;
}

#toggleSidebarBtn i {
    transition: transform 0.2s;
}

#toggleSidebarBtn.collapsed i {
    transform: rotate(180deg);
}

/* Modal close button styling */
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
}

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

.amount-cell {
    text-align: right;
    font-family: monospace;
    white-space: nowrap;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    border: 1px solid var(--border);
}

.summary-table td {
    padding: 10px 12px;
    border: 1px solid var(--border-light);
}

.summary-table .label-cell {
    font-weight: 500;
    width: 45%;
    background: var(--bg-tertiary);
}

.highlight-row td {
    background: var(--highlight-row);
}

.dark-mode-toggle-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--ribbon-btn-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    z-index: 100;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-dialog {
    background: var(--bg-card);
    border-radius: 6px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border);
    animation: slideUp 0.25s ease;
}

.modal-dialog.large {
    max-width: 550px;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-blue);
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 3px;
    cursor: pointer;
}

/* Template Badge Styles untuk Modal */
.modal-template-wrapper {
    margin-top: 4px;
    margin-bottom: 12px;
}


.modal-template-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.template-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-primary);
}

.template-badge:hover {
    background: var(--ribbon-btn-hover);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

/* Tooltip styles */
.row-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
    min-width: 120px;
}

.row-tooltip button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.1s;
    color: var(--text-primary);
    font-family: inherit;
}

.row-tooltip button:hover {
    background: var(--ribbon-btn-hover);
}

.row-tooltip button i {
    width: 16px;
    font-size: 13px;
}

.row-tooltip .tooltip-delete {
    border-top: 1px solid var(--border-light);
    color: var(--accent-red);
}

.row-tooltip .tooltip-delete:hover {
    background: rgba(198, 40, 40, 0.1);
}

/* Tooltip Modal Backdrop - for mobile */
.tooltip-backdrop {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.tooltip-backdrop .row-tooltip.mobile-modal {
    position: static;
    transform: none;
    width: calc(100% - 48px);
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    border: none;
    animation: slideUp 0.2s ease;
}

.tooltip-backdrop .row-tooltip.mobile-modal button {
    padding: 14px 20px;
    font-size: 15px;
    gap: 12px;
}

.tooltip-backdrop .row-tooltip.mobile-modal button i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 1100;
    animation: slideInRight 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.success {
    border-left: 3px solid var(--accent-green);
}

.toast.error {
    border-left: 3px solid var(--accent-red);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

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

/* Responsive Breakpoints */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .top-bar {
        padding: 8px 12px;
    }

    .top-bar-left .report-date-display {
        font-size: 14px;
        padding: 6px 10px;
    }

    .app-icon-small {
        height: 24px;
    }

    .top-bar-btn {
        padding: 14px 16px;
        font-size: 18px;
    }

    /* On mobile, top bar buttons only show icons, hide text */
    .top-bar-btn span {
        display: none;
    }

    .top-bar-btn i {
        font-size: 16px;
        margin: 0;
    }

    /* Hide show/hide button on mobile */
    #toggleSidebarBtn {
        display: none;
    }

    /* Hide ribbon toolbar on mobile - use bottom toolbar instead */
    .ribbon-toolbar {
        display: none !important;
    }

    /* Show mobile bottom toolbar */
    .mobile-bottom-toolbar {
        display: flex;
    }

    .section-header h3,
    textarea,
    input {
        font-size: 14px;
    }

    .workspace {
        padding: 12px;
        margin-bottom: 70px;
        overflow-x: auto;
    }

    .doc-paper {
        padding: 16px;
        min-width: 320px;
    }

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

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 15px;
        padding: 10px 12px;
    }

    .table-add-btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .table-add-btn i {
        font-size: 16px;
    }

    .section-header h3 {
        font-size: 15px;
    }

    .finance-table th,
    .finance-table td {
        padding: 10px 8px;
        font-size: 14px;
    }

    .amount-cell {
        font-size: 14px;
        font-weight: 700;
    }

    .summary-table td {
        padding: 10px 8px;
        font-size: 14px;
    }

    #summarySaldo {
        font-size: 18px !important;
    }

    .wrapperscroll {
        overflow-x: auto;
    }

    .home-btn {
        position: static;
        margin-bottom: 10px;
        display: inline-flex;
    }

    /* Tooltip on mobile - removed, now uses modal backdrop */
}

/* Dashboard mobile: table -> card layout */
@media (max-width: 768px) {
    .dashboard-table.table-container {
        overflow-x: visible;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .dashboard-table .data-table thead {
        display: none;
    }

    .dashboard-table .data-table,
    .dashboard-table .data-table tbody,
    .dashboard-table .data-table tr,
    .dashboard-table .data-table td {
        display: block;
    }

    .dashboard-table .data-table tr {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }

    .dashboard-table .data-table td {
        border: none;
        padding: 6px 0;
        text-align: left;
        white-space: normal;
        display: flex;
        align-items: flex-start;
        gap: 6px;
    }

    .dashboard-table .data-table td {
        font-size: 14px;
        padding: 8px 0;
    }

    .dashboard-table .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        min-width: 100px;
        flex-shrink: 0;
        font-size: 13px;
    }

    .dashboard-table .data-table td:last-child {
        border-top: 1px solid var(--border-light);
        margin-top: 8px;
        padding-top: 10px;
    }

    .dashboard-table .data-table td.action-buttons {
        justify-content: flex-end;
        gap: 8px;
    }

    .dashboard-table .data-table td.action-buttons::before {
        display: none;
    }

    .dashboard-table .data-table td strong {
        font-size: 16px;
    }

    .dashboard-table .data-table tr:hover {
        background: var(--bg-card);
    }

    .dashboard-table .data-table td[data-label="No"] {
        display: none;
    }

    .empty-state td {
        display: block !important;
        text-align: center !important;
        padding: 32px !important;
    }

    .empty-state td::before {
        display: none !important;
    }

    .app-header {
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 10px;
    }

    .header-left h1 {
        font-size: 1.2rem;
    }

    .app-icon {
        height: 36px;
    }

    .header-right {
        /* width: 100%; */
        justify-content: flex-start;
        gap: 6px;
    }

    .dark-mode-toggle,
    .install-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .action-bar {
        justify-content: stretch;
    }

    .action-bar .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 14px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .top-bar-left .report-date-display {
        font-size: 13px;
        padding: 5px 8px;
    }

    .app-icon-small {
        height: 24px;
    }

    .top-bar-btn {
        padding: 8px 10px;
    }

    .top-bar-btn i {
        font-size: 16px;
    }

    .mobile-tool-btn {
        min-width: 50px;
        padding: 6px 10px;
    }

    .mobile-tool-btn i {
        font-size: 18px;
    }

    .mobile-tool-btn span {
        font-size: 10px;
    }

    .doc-paper {
        min-width: 320px;
        padding: 14px;
    }

    .dashboard-table .data-table td::before {
        min-width: 80px;
        font-size: 12px;
    }

    .dashboard-table .data-table tr {
        padding: 12px;
    }

    .dashboard-table .data-table td {
        font-size: 13px;
        padding: 6px 0;
    }

    .header-left h1 {
        font-size: 1.1rem;
    }

    .app-icon {
        height: 32px;
    }

    .dark-mode-toggle span {
        display: none;
    }
}

@media (min-width: 769px) {
    .ribbon-toolbar {
        position: sticky;
    }

    .mobile-bottom-toolbar {
        display: none;
    }
}

/* Print Styles */
@media print {

    @page {
        size: Folio;
    }

    .top-bar,
    .ribbon-toolbar,
    .mobile-bottom-toolbar,
    .table-action-row,
    .table-add-btn,
    .dark-mode-toggle,
    .dark-mode-toggle-floating,
    .home-btn,
    .action-bar,
    .action-btn,
    .btn {
        display: none !important;
    }

    .workspace {
        padding: 0;
        margin-bottom: 0;
        overflow-x: visible;
    }

    .doc-paper {
        box-shadow: none;
        padding: 0;
        border: none;
        min-width: auto;
    }
}