/* Core Styling Variables & System Defaults Reset */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: var(--md-sys-color-background);
}

/* Material Design 3 Default Global Tokens Layout mapping variables */
:root, [data-theme="light"] {
    --md-sys-color-primary: #1B365D;
    --md-sys-color-secondary: #4A607A;
    --md-sys-color-background: #F8F9FA;
    --md-sys-color-surface: #FFFFFF;
    --md-sys-color-surface-variant: #E1E2EC;
    --md-sys-color-on-surface: #111318;
    --md-sys-color-on-surface-variant: #44474F;
}

[data-theme="dark"] {
    --md-sys-color-primary: #A8C7FA;
    --md-sys-color-secondary: #ADC6E5;
    --md-sys-color-background: #111318;
    --md-sys-color-surface: #1A1C22;
    --md-sys-color-surface-variant: #44474F;
    --md-sys-color-on-surface: #E3E2E6;
    --md-sys-color-on-surface-variant: #C4C6D0;
}

/* Unified Layout Cards Grid System Definition */
.tool-card {
    background-color: var(--md-sys-color-surface);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--md-sys-color-surface-variant);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}


.pwa-install-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .pwa-install-btn:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }


.toast-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 350px;
    width: 100%;
}

.toast-card {
    padding: 16px;
    border-radius: 8px;
    background: var(--md-sys-color-surface);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.25s ease-out;
}

.toast-header {
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.toast-body {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* UI Input Matrix Component Layout Assets */
.file-input-field {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: 8px;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    font-size: 13px;
    box-sizing: border-box;
}

.file-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    background-color: #E8F5E9;
    color: #2E7D32;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 500;
}

.matrix-select {
    padding: 10px;
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: 6px;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    font-size: 13px;
    outline: none;
    width: 100%;
}

.btn-secondary-action {
    background-color: transparent;
    color: var(--md-sys-color-secondary);
    border: 1px dashed var(--md-sys-color-secondary);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary-action:hover {
        background-color: rgba(74, 96, 122, 0.05);
    }

.btn-primary-execute {
    background-color: #1B365D;
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

    .btn-primary-execute:disabled {
        background-color: var(--md-sys-color-surface-variant);
        color: var(--md-sys-color-on-surface-variant);
        cursor: not-allowed;
        box-shadow: none;
    }



/* Custom Profile & History Table Control Layout Blocks */
.profile-text-input {
    padding: 8px 12px;
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: 6px;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

    .profile-text-input:focus {
        border-color: var(--md-sys-color-primary);
    }

.btn-apply-preset {
    background-color: #0288D1;
    color: #FFFFFF;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s;
}

    .btn-apply-preset:hover {
        background-color: #01579B;
    }

/* Give hover states to history records for better scanning visibility */
tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Real-time Data Grid Preview Controls Layout */
.preview-scroll-container {
    width: 100%;
    max-height: 220px;
    overflow-x: auto;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: 6px;
    background-color: var(--md-sys-color-surface);
}

.preview-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    font-family: 'Roboto Mono', monospace;
    text-align: left;
}

    .preview-grid-table th {
        background-color: #F1F3F4;
        color: var(--md-sys-color-on-surface);
        padding: 6px 10px;
        position: sticky;
        top: 0;
        z-index: 2;
        border-bottom: 1px solid #ccc;
        white-space: nowrap;
    }

    .preview-grid-table td {
        padding: 6px 10px;
        border-bottom: 1px solid #E8EAED;
        color: #3C4043;
        white-space: nowrap;
    }

.btn-download-now {
    background-color: #2E7D32;
    color: #FFFFFF;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

    .btn-download-now:hover {
        background-color: #1B5E20;
    }

/* Clipboard Grid Paste Capture Interface Area */
.paste-box-area {
    width: 100%;
    height: 48px;
    padding: 8px 12px;
    border: 1px dashed var(--md-sys-color-secondary);
    border-radius: 6px;
    background-color: #FAFAFA;
    color: var(--md-sys-color-on-surface);
    font-size: 12px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease-in-out;
}

    .paste-box-area:focus {
        height: 100px;
        background-color: #FFFFFF;
        border-style: solid;
        border-color: var(--md-sys-color-primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
.toast-viewport {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

    .toast-card.success {
        background-color: #2E7D32;
    }

    .toast-card.error {
        background-color: #C62828;
    }

    .toast-card.info {
        background-color: #0288D1;
    }

@keyframes slideIn {
    from {
        transform: translateX(120%);
    }

    to {
        transform: translateX(0);
    }
}