/* CSS Variables for design tokens */
:root {
    --bg-primary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-header: #04162B;
    --bg-checkbox: #F8FAFC;
    
    --color-text-main: #1E293B;
    --color-text-muted: #475569;
    --color-text-white: #FFFFFF;
    --color-brand-blue: #0C346B;
    --color-error: #DC2626;
    --color-success: #15803D;
    
    --border-color: #D2D6DC;
    --border-color-hover: #94A3B8;
    --border-focus: #2B6CB0;
    --focus-ring-shadow: 0 0 0 3px rgba(43, 108, 176, 0.25);
    
    --font-sans: Arial, sans-serif;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;


    --navy:       #0f172a;
    --blue:       #1d4ed8;
    --blue-lt:    #3b82f6;
    --blue-pale:  #eff6ff;
    --red:        #dc2626;
    --green:      #16a34a;
    --purple:     #7c3aed;
    --surface:    #ffffff;
    --bg:         #f8fafc;
    --border:     #e2e8f0;
    --border-lt:  #f1f5f9;
    --text:       #0f172a;
    --text-md:    #334155;
    --text-lt:    #64748b;
    --text-xs:    #94a3b8;
    --r-sm:       6px;
    --r:          10px;
    --r-lg:       14px;
    --sh-sm:      0 1px 2px rgba(0,0,0,.05);
    --sh:         0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.04);
    --sh-md:      0 4px 16px rgba(0,0,0,.10);
    --sidebar-w:  272px;
    --nav-h:      56px;
}

/* Basic Reset & Base Styling */
*
{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background-color: var(--bg-primary);
    font-family: var(--font-sans);
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Accessibility Focus Indicator */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.nda-scrollbox:focus-visible,
a:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Custom visual focus for keyboard navigation on checkbox */
.custom-checkbox-input:focus-visible + .custom-checkbox-label .checkbox-box {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Main Site Header */
.site-header {
    color: var(--color-brand-blue);
}

.header-content {
    max-width: 1150px;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Navigation styling */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #44b3ff;
    text-decoration: underline;
    font-weight: bold;
}

.nav-link:hover {
    color: var(--color-brand-blue);
    text-decoration: underline;
}

.header-logo {
    display: block;
    margin: 10px;
}

.logo-text {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.05em;
}

.portal-badge {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
}

/* Portal Container Layout */
.portal-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 48px 20px;
}

/* Intro / Description Section */
.portal-intro {
    text-align: left;
    margin-bottom: 36px;
}

.intro-icon-container {
    margin-bottom: 20px;
}

.intro-icon {
    display: inline-block;
}

#page-title {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.intro-description {
    font-size: 18px;
    color: #444444;
    margin: 0;
    line-height: 1.6;
}





.form-section {
    width: 100%;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

/* NDA Scrollable Area */
.nda-scrollbox {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    height: 310px;
    overflow-y: auto;
    background-color: #FAFAFA;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F1F5F9;
}

/* Styled scrollbar for webkit */
.nda-scrollbox::-webkit-scrollbar {
    width: 8px;
}

.nda-scrollbox::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: var(--radius-md);
}

.nda-scrollbox::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: var(--radius-md);
}

.nda-scrollbox::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.nda-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-bottom: 16px;
}

.nda-scrollbox p {
    font-size: 18px;
    color: #444444;
    margin-bottom: 16px;
    line-height: 1.6;
}

.nda-scrollbox h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 8px;
    margin-top: 16px;
}

/* Checkbox Container styles */
.checkbox-container {
    border: 1px solid #cccccc;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

/* Hide checkbox natively but keep accessible */
.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    width: 100%;
}

.checkbox-box {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    margin-top: 2px;
}

.checkmark-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-white);
    opacity: 0;
    transform: scale(0.5);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Checkbox Active / Checked States */
.custom-checkbox-input:checked + .custom-checkbox-label .checkbox-box {
    background-color: var(--color-brand-blue);
    border-color: var(--color-brand-blue);
}

.custom-checkbox-input:checked + .custom-checkbox-label .checkmark-icon {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox-label:hover .checkbox-box {
    border-color: var(--border-color-hover);
}

.checkbox-text {
    font-size: 18px;
    color: #444444;
    line-height: 1.55;
}

/* Divider line */
.section-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 36px 0;
}

/* Access Request Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    row-gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 18px;
    font-weight: 600;
    color: #444444;
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--color-text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94A3B8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: var(--focus-ring-shadow);
}

/* Custom Select styling to replace browser native styling */
.select-wrapper {
    position: relative;
    width: 100%;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Textarea height */
.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Field Helpers & Error States */
.field-help {
    font-size: 15px;
    color: #444444;
    margin-top: 6px;
}

.field-error-message {
    font-size: 15px;
    color: var(--color-error);
    margin-top: 6px;
    font-weight: 500;
}

.field-success-message {
    font-size: 15px;
    color: var(--color-success);
    margin-top: 6px;
    font-weight: 500;
}

.form-input.input-error,
.form-select.input-error,
.checkbox-box.input-error {
    border-color: var(--color-error);
}

.form-input.input-error:focus,
.form-select.input-error:focus {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Submit Container Layout */
.submit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.submit-button {
    background-color: #1677ba;
    color: var(--color-text-white);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 28px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: normal;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.submit-button:hover {
    background-color: #094672;
}

.submit-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.submit-button.loading .button-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.button-icon {
    display: block;
    color: var(--color-text-white);
}

.submit-disclaimer {
    font-size: 15px;
    color: #444444;
    text-align: center;
    margin-top: 16px;
    line-height: 1.55;
}

/* Success Card View */
.success-card {
    background-color: var(--bg-card);
    border: 1px solid #D1E7DD;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 48px 32px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 40px auto 0 auto;
    /* animation: fadeIn var(--transition-normal); */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}


.page-overlay{
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3;
    left: 0;
    top: 0;
}


.success-icon-container {
    width: 64px;
    height: 64px;
    background-color: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

.success-checkmark {
    width: 40px;
    height: 40px;
}

.success-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1b5e20;
    margin-bottom: 16px;
}

.success-card p {
    font-size: 15px;
    color: #000;
}

/* Site Footer */
.site-footer {
    background-color: var(--bg-header);
    color: rgba(255, 255, 255, 0.6);
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-text-white);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.2);
}

/* CSS Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form-grid{
    max-width: calc(50% - 20px);
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 20px;
}

.login-form-grid .submit-container{
    margin-top: 20px;
}

.access-form h2 span{
    font-size: 16px;
    font-weight: normal;
    display: block;
}

a.logout-link{
    color: #44b3ff;
    font-weight: 600;
    font-size: 18px;
}

.submit-button {
    background-color: #1677ba;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 28px;
    font-family: var(--font-sans);
    font-size: 16px;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center content */
    gap: 10px;

    transition: background-color var(--transition-fast),
                box-shadow var(--transition-fast),
                transform var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.spinner {
  width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: none;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


.form-section a{
    color:#44b3ff;
}
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
h1,h2,h3 { font-family: var(--font); }

/* ════════════════════════════════════════
   SHELL GRID
   ════════════════════════════════════════ */
#ipdp-shell {
    display: flex;
    /* grid-template-rows: var(--nav-h) 1fr auto;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-areas:
        "nav     nav"
        "sidebar main"
        "footer  footer"; */
    min-height: 100vh;
    flex-direction:column;
}

/* ════════════════════════════════════════
   NAV
   ════════════════════════════════════════ */
#ipdp-nav {
    grid-area: nav;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
    max-width: 1150px;
    padding: 20px;
    margin: 0 auto;
    width: 100%;
}

.explorer-nav #ipdp-nav{
    max-width: unset;
}


.ipdp-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    /* letter-spacing: .04em; */
    min-width: var(--sidebar-w);
    padding-right: 24px;
    flex-grow: 1;
    /* flex-shrink: 0; */
    /* max-width: 50%; */
}

.ipdp-nav-brand-icon p{
    /* max-width: 80%; */
    width: 100%;
    font-weight: 600;
    color: #444444;
    margin-top: 16px;
}
.ipdp-nav-brand-icon {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* flex-shrink: 0; */
    /* flex-direction: column; */
    color: #444444;
}
.ipdp-nav-brand-icon svg { width: 16px; height: 16px; color: #fff; }
.ipdp-nav-center {
    flex: 1;
    color: rgba(255,255,255,.65);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.ipdp-nav-right { display: flex; align-items: center; gap: 6px; 
flex-grow: 1;
justify-content: flex-end;
}
.ipdp-nav-help {
    display: flex; align-items: center; gap: 6px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    transition: background .15s;
}
.ipdp-nav-help:hover { background: rgba(255,255,255,.08); color: #fff; }
.ipdp-nav-help svg { width: 16px; height: 16px; }
.ipdp-nav-user {
    display: flex; align-items: center; gap: 8px;
    color: #000;
    font-size: 18px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--r-sm);
    transition: background .15s;
}
.ipdp-nav-user:hover { background: rgba(255,255,255,.08); }
.ipdp-nav-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--blue);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}
.ipdp-nav-chevron { width: 14px; height: 14px; opacity: .5; }

/* ════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════ */
#ipdp-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 28px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 290px;
    width: 100%;
}
.ipdp-sb-brand { display: flex; align-items: flex-start; gap: 12px; }
.ipdp-sb-shield {
    flex-shrink: 0;
    width: 42px; height: 42px;
    background: var(--blue-pale);
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.ipdp-sb-shield svg { width: 22px; height: 22px; color: var(--blue); }
.ipdp-sb-subtitle { font-size: 18px; color: var(--text-lt); line-height: 1.3; }
.ipdp-sb-title    { font-size: 27px; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: 2px; }
.ipdp-sb-hr       { height: 1px; background: var(--border); }
.ipdp-sb-desc     { font-size: 18px; color: var(--text-md); line-height: 1.6; }
.ipdp-sb-section-label {
    font-size: 18px; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--blue); margin-bottom: 10px;
}
.ipdp-guidelines { display: flex; flex-direction: column; gap: 8px; }
.ipdp-guideline {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 18px; color: var(--text-md); line-height: 1.5;
}
.ipdp-guideline-icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; color: var(--text-lt); }
.ipdp-guideline-icon svg { width: 16px; height: 16px; }
.ipdp-sb-assist {
    margin-top: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px;
}
.ipdp-assist-hd   { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ipdp-assist-icon {
    width: 32px; height: 32px;
    background: #e0e7ff; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ipdp-assist-icon svg { width: 16px; height: 16px; color: #4f46e5; }
.ipdp-assist-title { font-size: 18px; font-weight: 700; color: var(--text); }
.ipdp-assist-body  { font-size: 18px; color: var(--text-lt); line-height: 1.55; margin-bottom: 8px; }
.ipdp-assist-link  { font-size: 18px; color: var(--blue); font-weight: 500; }
.ipdp-assist-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   MAIN
   ════════════════════════════════════════ */
#ipdp-main { 
    padding: 32px 32px 48px;
    flex-grow: 1;
 }

.ipdp-page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 16px;
    margin-bottom: 28px;
}
.ipdp-page-title { font-size: 30px; font-weight: 600; color: var(--text); letter-spacing: -.3px; }
.ipdp-page-sub   { font-size: 18px; color: var(--text-lt); margin-top: 4px; }

/* ── Toolbar ── */
.ipdp-toolbar { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ipdp-search-wrap { position: relative; }
.ipdp-search-icon {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; color: var(--text-xs); pointer-events: none;
}
.ipdp-search-input {
    width: 220px;
    padding: 8px 32px 8px 34px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    font-size: 15px; color: var(--text); font-family: var(--font);
    box-shadow: var(--sh-sm); outline: none;
    transition: border-color .2s, box-shadow .2s, width .25s;
}
.ipdp-search-input:focus {
    border-color: var(--blue-lt);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    /* width: 280px; */
}
.ipdp-search-clear {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    color: var(--text-lt); font-size: 13px;
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background .15s;
}
.ipdp-search-clear:hover { background: var(--border); }

.ipdp-view-toggles {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--sh-sm);
}
.ipdp-view-btn {
    width: 34px; height: 34px;
    border: none; background: transparent;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-lt);
    transition: background .15s, color .15s;
}
.ipdp-view-btn svg { width: 16px; height: 16px; }
.ipdp-view-btn.active { background: var(--blue-pale); color: var(--blue); }
.ipdp-view-btn:hover:not(.active) { background: var(--bg); color: var(--text); }
.ipdp-view-btn + .ipdp-view-btn { border-left: 1px solid var(--border); }

/* ════════════════════════════════════════
   CATEGORY SECTIONS
   ════════════════════════════════════════ */
.ipdp-section {
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh);
    animation: fadeUp .35s ease both;
}
@keyframes fadeUp {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0);   }
}

.ipdp-section-head {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-lt);
}
.ipdp-cat-badge {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.ipdp-cat-name  { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ipdp-cat-desc  { font-size: 18px; color: var(--text-lt); line-height: 1.5; max-width: 480px; margin-bottom: 6px; }
.ipdp-cat-count { font-size: 15px; color: var(--blue); font-weight: 500; }

/* ════════════════════════════════════════
   DOCUMENT CARDS — GRID
   ════════════════════════════════════════ */
.ipdp-docs-body { padding: 20px 24px; }

.ipdp-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ipdp-doc-card {
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    display: flex; flex-direction: column;
    transition: box-shadow .2s, border-color .2s, transform .15s;
    overflow: hidden;
}
.ipdp-doc-card:hover {
    box-shadow: var(--sh-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* card header */
.ipdp-card-top {
    display: flex; gap: 10px;
    padding: 14px 14px 10px;
    flex: 1;
}
.ipdp-card-file-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.ipdp-card-file-icon svg { width: 18px; height: 18px; color: #fff; }

/* icon colour classes */
.fi-pdf   { background: var(--red); }
.fi-mp4   { background: var(--purple); }
.fi-xlsx  { background: var(--green); }
.fi-other { background: var(--text-lt); }

.ipdp-card-info { flex: 1; min-width: 0; }
.ipdp-card-title {
    font-size: 18px; font-weight: 600; color: var(--text);
    line-height: 1.35; margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ipdp-card-excerpt {
    font-size: 18px; color: var(--text-lt); line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ipdp-card-menu {
    flex-shrink: 0; align-self: flex-start;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none;
    color: var(--text-xs); border-radius: 4px; font-size: 15px;
    opacity: 0; transition: opacity .15s, background .15s;
}
.ipdp-doc-card:hover .ipdp-card-menu { opacity: 1; }
.ipdp-card-menu:hover { background: var(--bg); color: var(--text-md); }

/* single-file bottom bar */
.ipdp-card-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px;
    border-top: 1px solid var(--border-lt);
}
.ipdp-card-meta {
    display: flex; align-items: center; gap: 4px;
    font-size: 15px; color: var(--text-lt); font-weight: 500;
}
.ipdp-meta-type { color: var(--text-md); font-weight: 600; }

/* multi-file rows */
.ipdp-card-files { border-top: 1px solid var(--border-lt); }
.ipdp-card-file-row {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-lt);
    transition: background .12s;
}
.ipdp-card-file-row:last-child { border-bottom: none; }
.ipdp-card-file-row:hover { background: var(--bg); }
.ipdp-cfi {
    width: 24px; height: 24px;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ipdp-cfi svg { width: 13px; height: 13px; color: #fff; }
.ipdp-card-file-label {
    flex: 1; min-width: 0;
    font-size: 18px; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ipdp-card-file-meta { font-size: 15px; color: var(--text-xs); white-space: nowrap; }

/* action button (download / view) */
.ipdp-action-btn {
    width: 26px; height: 26px;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-lt);
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.ipdp-action-btn:hover { background: var(--bg); color: var(--text); }
.ipdp-action-btn svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════
   LIST VIEW
   ════════════════════════════════════════ */
.ipdp-docs-list { display: flex; flex-direction: column; }
.ipdp-list-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border-lt);
    border-radius: var(--r-sm);
    transition: background .12s;
}
.ipdp-list-row:last-child { border-bottom: none; }
.ipdp-list-row:hover { background: var(--bg); }
.ipdp-list-icon {
    width: 30px; height: 30px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ipdp-list-icon svg { width: 16px; height: 16px; color: #fff; }
.ipdp-list-info { flex: 1; min-width: 0; }
.ipdp-list-title {
    font-size: 13px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ipdp-list-desc {
    font-size: 11.5px; color: var(--text-lt);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ipdp-list-meta {
    display: flex; align-items: center; gap: 4px;
    font-size: 11.5px; color: var(--text-lt);
    white-space: nowrap; min-width: 90px; justify-content: flex-end;
}
.ipdp-list-meta-type { font-weight: 600; color: var(--text-md); }
.ipdp-list-actions { display: flex; align-items: center; gap: 2px; }

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
#ipdp-footer {
    grid-area: footer;
    background: var(--navy);
    color: rgba(255,255,255,.4);
    font-size: 12px;
    padding: 14px 28px;
    display: flex; align-items: center; justify-content: space-between;
}
.ipdp-footer-links { display: flex; gap: 20px; }
.ipdp-footer-links a { color: rgba(255,255,255,.45); transition: color .15s; }
.ipdp-footer-links a:hover { color: #fff; }

/* ════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════ */
.ipdp-empty  { padding: 20px 24px; font-size: 13px; color: var(--text-lt); font-style: italic; }
.ipdp-hidden { display: none !important; }

.ipdp-main-container{
    display: flex;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
}



@media (max-width: 900px) {
   
    #ipdp-sidebar { display: none; }
    #ipdp-main { padding: 20px 16px 40px; }
    .ipdp-docs-grid { grid-template-columns: 1fr 1fr; }

    .ipdp-nav-brand{
        max-width: 100%;
        padding-right: 0;
    }

    .ipdp-nav-brand-icon p {
    max-width: 100%;
    font-size: 14px;
}


    #ipdp-nav{
        flex-direction: column;
        align-items: flex-start;
    }
}



/* Responsive Breakpoints */
@media (max-width: 768px) {
    .portal-container {
        padding: 32px 20px;
    }
    
    
    
    #page-title {
        font-size: 28px;
    }

    #ipdp-nav{
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .ipdp-docs-grid     { grid-template-columns: 1fr; }
    .ipdp-page-header   { flex-direction: column; gap: 12px; }
    .ipdp-toolbar       { width: 100%; }
    .ipdp-search-input,
    .ipdp-search-input:focus { width: 100%; }
}
