/*
 * Resource module — shared primitives.
 *
 * Palette and the form-row grids mirror css/projects/shared.css deliberately: the two
 * modules render the same components (overlay modals, data tables, detail cards) and
 * keeping the values identical is what stops them drifting into different-looking
 * versions of the same thing. Anything genuinely global (.data-table, .modal-overlay,
 * .no-results, .filter-dropdown, .btn) already lives in v2-styles.css and is NOT
 * repeated here.
 *
 * Loaded by every screen in the module; per-screen layout lives in the sibling
 * dashboard/, vendors/, vendor/, file-storage/, scratch-pad/ and library/ files.
 */

:root {
    --res-navy: #182442;
    --res-green: #5dc19b;
    --res-blue: #3b82f6;
    --res-amber: #f59e0b;
    --res-slate: #94a3b8;
    --res-red: #dc2626;
    --res-border: #e2e8f0;
    --res-muted: #64748b;
}

/* ============================ Form rows ============================ */
/* .two-col matches projects/shared.css. .three-col is new — the vendor address
   block needs City / State / Zip on one line. */

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

.form-row.three-col {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
}

@media (max-width: 720px) {
    .form-row.two-col,
    .form-row.three-col { grid-template-columns: 1fr; }
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--res-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Aligns the checkbox with the inputs beside it, which carry a label above. */
    margin-top: 26px;
    cursor: pointer;
}

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

/* ============================ Panels ============================ */
/* The generic card wrapper used by the dashboard and both file screens. */

.panel {
    background: #fff;
    border: 1px solid var(--res-border);
    border-radius: 8px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--res-border);
}

.panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--res-navy);
}

.panel-body {
    padding: 16px;
}

/* ============================ File name cells ============================ */
/* Shared by File Storage and Library: an icon column plus a name that stays on one
   line. A long file name truncates rather than wrapping, which would make every row
   in the table a different height. */

.file-icon {
    width: 28px;
    text-align: center;
    color: var(--res-muted);
    font-size: 16px;
}

.file-name {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* A folder row is navigable; a file row is not. */
.row-folder .file-name {
    font-weight: 600;
    color: var(--res-navy);
    cursor: pointer;
}

.row-folder .file-icon {
    color: var(--res-amber);
}
