﻿/* File: styles.css */

/*——————————————————————————*/
/* Variables */
/*——————————————————————————*/
:root {
    --font-sans: 'Segoe UI', sans-serif;
    --color-bg: #F4F5F8;
    --color-surface: #FFFFFF;
    --color-primary: #6A5BE2;
    --color-primary-hover: #5748C1;
    --color-text: #2E3A59;
    --color-text-light: #617093;
    --color-error: #D14343;
    --color-success: #188038;
    --radius: 8px;
    --shadow-light: 0 2px 6px rgba(0,0,0,0.08);
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --font-size-base: 14px;
    --font-size-small: 0.875rem;
    --font-size-large: 1.25rem;
    --spacing-field: 16px;
}

/*——————————————————————————*/
/* Reset & Base */
/*——————————————————————————*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    font-family: var(--font-sans);
}

body {
    background: var(--color-bg);
    color: var(--color-text);
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/*——————————————————————————*/
/* Top Nav */
/*——————————————————————————*/
.top-nav {
    background: var(--color-primary);
    box-shadow: var(--shadow-light);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    height: 62px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-link {
    color: #FFF;
    margin-left: var(--spacing-lg);
    text-decoration: none;
    font-weight: 500;
    padding: 8px;
    border-radius: var(--radius);
    transition: background .2s;
}

    .nav-link:hover {
        background: rgba(255,255,255,0.15);
    }

/*——————————————————————————*/
/* User menu */
/*——————————————————————————*/
.user-menu {
    position: relative;
    color: #FFF;
    margin-left: var(--spacing-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .user-menu .username {
        margin: 0 6px;
        font-weight: 500;
    }

    .user-menu .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: #FFF;
        color: #333;
        list-style: none;
        padding: 0;
        margin: 4px 0 0;
        border-radius: var(--radius);
        box-shadow: var(--shadow-light);
        display: none;
        min-width: 140px;
        z-index: 10;
    }

    

    .user-menu .user-dropdown li a {
        display: block;
        padding: 8px 12px;
        color: #333;
        text-decoration: none;
    }

        .user-menu .user-dropdown li a:hover {
            background: #F1F3F5;
        }

/*——————————————————————————*/
/* Content & Cards */
/*——————————————————————————*/
.content-wrapper {
    padding: var(--spacing-xl) 0;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/*——————————————————————————*/
/* Form Fields */
/*——————————————————————————*/
.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.styled-dropdown,
.styled-input,
.file-dropzone,
.file-list,
.template-link {
    display: block;
    width: 100%;
    margin-bottom: var(--spacing-field);
}

.styled-input,
.styled-dropdown {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    border: 1px solid #D1D5DB;
    border-radius: var(--radius);
    background: #FFF;
}

    .styled-input:focus,
    .styled-dropdown:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(106,91,226,0.2);
    }

/*——————————————————————————*/
/* Drag & Drop */
/*——————————————————————————*/
.file-dropzone {
    position: relative;
    height: 150px;
    border: 2px dashed #D1D5DB;
    border-radius: var(--radius);
    background: #FAFBFC;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

    .file-dropzone:hover {
        background: #F0F2F5;
        border-color: var(--color-primary);
    }

.hidden-fileupload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dz-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.dz-text {
    font-weight: 500;
}

.dz-help {
    font-size: var(--font-size-small);
    margin-top: 4px;
}

/*——————————————————————————*/
/* File list */
/*——————————————————————————*/
.file-list {
    list-style: none;
    padding-left: 0;
    font-size: var(--font-size-small);
    color: var(--color-text);
}

    .file-list li {
        margin-bottom: 4px;
    }

/*——————————————————————————*/
/* Buttons */
/*——————————————————————————*/
.btn-primary {
    background: var(--color-primary);
    color: #FFF;
    padding: 8px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

    .btn-primary:hover {
        background: var(--color-primary-hover);
    }

.btn-secondary {
    background: #FFF;
    color: var(--color-text);
    border: 1px solid #D1D5DB;
    padding: 8px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .2s;
}

    .btn-secondary:hover {
        background: #F1F3F5;
    }

/* A smaller button variant for “Review” / “View Details” */
.btn-small {
    font-size: 0.75rem; /* Reduced font size */
    padding: 4px 12px; /* Smaller padding */
    border-radius: 4px;
    cursor: pointer;
    background: #FFF;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    transition: background .2s;
}

    .btn-small:hover {
        background: #F0F2F5;
    }

/* (Optional) a variant if you want a smallish primary‐colored button */
.btn-small-primary {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    background: var(--color-primary);
    color: #FFF;
    border: none;
    transition: background .2s;
}

    .btn-small-primary:hover {
        background: var(--color-primary-hover);
    }

/*——————————————————————————*/
/* Feedback */
/*——————————————————————————*/
.error-text,
.success-text {
    display: block;
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-field);
    font-weight: 500;
}

.error-text {
    color: var(--color-error);
}

.success-text {
    color: var(--color-success);
}

/*——————————————————————————*/
/* Modal */
/*——————————————————————————*/
#successModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

    #successModal .modal-content {
        background: #FFF;
        padding: var(--spacing-lg);
        border-radius: var(--radius);
        max-width: 400px;
        width: 90%;
        text-align: center;
    }

    #successModal .modal-header {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-sm);
        font-weight: 600;
    }

    #successModal .modal-body {
        margin-bottom: var(--spacing-sm);
    }

    #successModal .modal-footer button {
        margin: 0 var(--spacing-sm);
    }

/*——————————————————————————*/
/* Footer */
/*——————————————————————————*/
.site-footer {
    text-align: center;
    padding: var(--spacing-md) 0;
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

/*——————————————————————————*/
/* My Requests unified styles */
/*——————————————————————————*/

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    align-items: center;
}

    .filter-bar .styled-dropdown,
    .filter-bar .styled-input {
        font-size: var(--font-size-small);
    }

    .filter-bar .styled-dropdown {
        width: 200px;
    }

    .filter-bar .styled-input {
        flex: 1;
    }

/* Request Cards */
.request-card {
    position: relative;
    margin-bottom: var(--spacing-lg);
    padding-top: 48px; /* room for badges */
    display: flex;
    flex-direction: column;
}

/* Top-right badges column */
.card-badges {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

/* Generic badge (applies to all badge types) */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75rem; /* Reduced from 0.875rem */
    font-weight: 500;
    margin-left: 0;
    margin-top: 0;
    color: #fff;
}

/* Status pills */
.badge-status-open {
    background: #FFD54F;
    color: #1A1A1A;
}

.badge-status-accepted-in-review {
    background: #4FC3F7;
    color: #FFF;
}

.badge-status-rejected {
    background: #EF5350;
    color: #FFF;
}

.badge-status-brd-incomplete {
    background: #FFB74D;
    color: #1A1A1A;
}

.badge-status-accepted-in-development {
    background: #9575CD;
    color: #FFF;
}

.badge-status-delivered {
    background: #66BB6A;
    color: #FFF;
}

.badge-status-validated-and-closed {
    background: #90A4AE;
    color: #FFF;
}

.badge-status-withdrawn {
    background: #AB47BC;
    color: #FFF;
}

/* Severity pills */
.badge-severity-low {
    background: #6CB2EB;
    color: #1A1A1A;
}

.badge-severity-medium {
    background: #F0AD4E;
    color: #1A1A1A;
}

.badge-severity-high {
    background: #D14343;
    color: #FFF;
}

.badge-severity-critical {
    background: #C53030;
    color: #FFF;
}

/* Business Unit pills */
/*.badge-bu-dis {
    background: #42A5F5;
    color: #FFF;
}

.badge-bu-kgb {
    background: #66BB6A;
    color: #FFF;
}

.badge-bu-mti {
    background: #AB47BC;
    color: #FFF;
}

.badge-bu-kri {
    background: #AB47BC;
    color: #FFF;
}*/

.badge-bu-dis {
    background: #42A5F5;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-kgb {
    background: #66BB6A;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-mti {
    background: #AB47BC;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-kri-fash {
    background: #6A5BE2;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-kri-fw {
    background: #F0AD4E;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-group {
    background: #66BB6A;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-doit {
    background: #ff6a00;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-wh {
    background: #00ffff;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-finance {
    background: #4800ff;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-hr {
    background: #b7d51b;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-legal {
    background: #A0A0A0;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-bu-others {
    background: #9B2C2C;
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}
    /* add more “.badge-bu-xxx” for each BU as needed */
    /* Type/Subtype pills */
    .badge-type-feature {
    background: #00BCD4;
    color: #FFF;
}

.badge-type-report {
    background: #00BCD4;
    color: #FFF;
}

.badge-type-issue {
    background: #D14343;
    color: #FFF;
}

/* Request-ID pill */
.badge-id {
    background: #E0E0E0;
    color: #424242;
}

/* Card body grows to push actions down */
.card-body {
    flex: 1;
}

/* Title, description, type */
.request-title {
    font-size: 1.125rem;
    margin: 0 0 8px;
}

.request-desc {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0 0 8px;
}

.request-type {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0 0 12px;
}

/* Date list */
.date-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 4px 16px;
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

    .date-list i {
        margin-right: 4px;
        color: var(--color-primary);
    }

/* View Details / Review button bottom-right within a card */
.card-actions {
    margin-top: auto;
    text-align: right;
}

/* Make the “View Details” or “Review” button smaller */
.request-card .card-actions .btn-primary,
.request-row .btn-small {
    font-size: 0.75rem;
    padding: 4px 12px;
}

/* Section‐level card wrapper */
.section-card {
    margin-bottom: 24px;
}

    .section-card h4 {
        margin: 0 0 8px 0;
        font-size: 1.125rem;
    }

/* Scrollable section content */
.section-scroll {
    max-height: 300px; /* adjust as needed */
    overflow-y: auto;
}

/* A compact table style if you choose to render rows as a table */
.table-compact {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.875rem;
}

    .table-compact th,
    .table-compact td {
        border: 1px solid #E0E0E0;
        padding: 4px 8px;
    }

/* “Close” button inside modals */
.btn-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

/*——————————————————————————*/
/* Pagination & “Showing x–y of z” */
/*——————————————————————————*/

/* Pager footer container */
.pager-footer {
    display: flex;
    justify-content: flex-end; /* Align items to bottom right */
    align-items: center;
    padding: var(--spacing-md) 0;
}

/* “Showing x–y of z results” label */
.pager-info {
    margin-right: auto; /* Push page links group to the right */
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

/* Wrapper around the actual page links so they sit together */
.pager-links {
    display: flex;
    gap: 4px;
}

/* Individual page link */
.page-link {
    margin: 0;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
    font-size: var(--font-size-small);
    border: 1px solid transparent;
    transition: background .2s, border-color .2s;
}

    .page-link:hover {
        border-color: var(--color-primary);
    }

    .page-link.current {
        background: var(--color-primary);
        color: #FFF;
    }

/*——————————————————————————*/
/* Miscellaneous */
/*——————————————————————————*/

/* No‐requests fallback */
.no-requests {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--color-text-light);
}

/*====================*/
/* ─── Status Timeline ───────────────────────────────────────── */
.ir-timeline-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
    overflow-x: auto;
    padding: 0 8px;
}

.ir-timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 12px;
}

    .ir-timeline-item:not(:last-child)::after {
        content: "➔";
        position: absolute;
        right: -12px;
        top: 50%;
        transform: translateY(-50%);
        color: #888;
        font-size: 18px;
    }

.ir-timeline-icon {
    font-size: 24px;
}

.ir-timeline-label {
    margin-top: 6px;
    font-weight: 600;
    color: #2E3A59;
    font-size: 14px;
}

.ir-timeline-date {
    font-size: 12px;
    color: #555;
    margin-top: 2px;
}

.ir-timeline-meta {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}
/*===================*/
.ir-attachment-block {
    padding: 10px 20px;
    font-size: 14px;
}

.ir-attachment-icon {
    margin-right: 6px;
    color: #555;
}

.ir-attachment-line {
    margin-bottom: 4px;
}

.ir-upload-meta {
    font-size: 11px;
    font-style: italic;
    color: #666;
    margin-top: 2px;
    margin-bottom: 10px;
}

/***********************************/

/* -----------------------------------------
   Top‐bar (logo + user) stays purple
   ----------------------------------------- */
.top-nav {
    background: #6A5BE2;
    color: #fff;
    padding: 8px 0;
}

    .top-nav .nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
/* Logo */
.logo-link .logo {
    height: 62px;
}

/* -----------------------------------------
   Sub‐nav bar (your links) sits below
   ----------------------------------------- */
.sub-nav {
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .sub-nav .nav-inner {
        display: flex;
        align-items: center;
    }

    .sub-nav .nav-menu {
        display: flex;
        gap: 15px;
    }

    .sub-nav .nav-link {
        color: #2E3A59;
        text-decoration: none;
        font-weight: 500;
        padding: 12px 0;
    }

        .sub-nav .nav-link:hover {
            color: #6A5BE2;
            border-bottom: 2px solid #6A5BE2;
        }

        /* if you need to override link.Visible = false */
        .sub-nav .nav-link[style*="display: none"] {
            display: none !important;
        }
/***************************/
/* make the whole user‐icon+name area hover-sensitive */
.user-menu {
    position: relative;
    display: inline-block;
    padding: 4px 8px; /* expand hit area */
    cursor: pointer;
}

    /* hide by default */
    .user-menu .user-dropdown {
        display: none;
        position: absolute;
        right: 0;
        top: 100%;
        margin-top: 4px; /* a little gap if you like */
        background: #fff;
        border: 1px solid #D1D5DB;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        list-style: none;
        padding: 0;
        z-index: 1000;
        min-width: 140px;
    }

       

        /* style the links inside */
        .user-menu .user-dropdown li a {
            display: block;
            padding: 8px 12px;
            color: #2E3A59;
            text-decoration: none;
            white-space: nowrap;
        }

            .user-menu .user-dropdown li a:hover {
                background: #F4F5F8;
            }

/*========================*/
/* ================
   SUB-NAV MULTI-ROW & COMPACT
   ================ */

/* Allow the <nav> itself to wrap onto multiple rows */
.sub-nav .nav-inner nav.nav-menu {
    display: flex;
    flex-wrap: wrap; /* permit wrapping */
    gap: 8px 12px; /* row-gap 8px, column-gap 12px */
    align-items: center; /* vertically center the links */
}

/* Shrink the overall height of the sub-nav bar */
.sub-nav {
    padding: 4px 0; /* reduce top/bottom padding */
}

    /* Tweak the container so it doesn’t force extra height */
    .sub-nav .nav-inner {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Make each link smaller and tighter */
    .sub-nav .nav-menu .nav-link {
        font-size: 0.85rem; /* smaller text */
        line-height: 1.2; /* compact line height */
        padding: 4px 8px; /* less vertical & horizontal padding */
        margin: 0; /* margins are handled by nav-menu gap */
        white-space: nowrap; /* don’t wrap the text inside a link */
        flex: 0 0 auto; /* prevent links from stretching */
    }

        /* Optional: if you want a little hover feedback */
        .sub-nav .nav-menu .nav-link:hover {
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
        }

/* If any of your existing rules are more specific,
   you can bump these up with !important. For example:

.sub-nav .nav-menu .nav-link {
  padding: 4px 8px !important;
}
*/
/*=================================*/
/* ----------------------------------------------------------------------------
   User-menu dropdown: stays open while you move into it
   ---------------------------------------------------------------------------- */
.user-menu {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    /* the hidden UL */
    .user-menu .user-dropdown {
        display: none;
        position: absolute;
        top: 100%; /* immediately below the user icon bar */
        right: 0; /* right-align it */
        margin-top: 4px; /* tiny gap so the mouse can bridge it */
        padding: 0;
        list-style: none;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        min-width: 140px;
        z-index: 1000;
    }

       

/* reset list items */
.user-dropdown li {
    margin: 0;
}

    .user-dropdown li + li {
        border-top: 1px solid #eee;
    }

    /* link styling */
    .user-dropdown li a {
        display: block;
        padding: 8px 12px;
        color: #333;
        text-decoration: none;
    }

        .user-dropdown li a:hover {
            background: #f5f5f5;
        }
/*==============================*/
/* hide by default */
.user-menu .user-dropdown {
    display: none;
}

/* when .open is on the parent, force show */
.user-menu.open .user-dropdown {
    display: block;
}

/* Container for each collapsible section */
.stats-panel {
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* The clickable header */
.stats-summary {
    display: block;
    background: #f7f7f7;
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    user-select: none;
}

    /* Add arrow indicators */
    .stats-summary::after {
        content: '▾';
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.8rem;
    }

.stats-panel:not([open]) .stats-summary::after {
    content: '▸';
}

/* Grid layout */
.stats-grid {
    display: grid;
    grid-template-columns: auto repeat(7, minmax(6rem,1fr));
    grid-template-rows: auto auto;
    gap: 0.5rem;
    padding: 1rem;
}

/* Total card spans both rows */
.stat-total {
    grid-row: 1 / span 2;
}

/* Card styling */
.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Icons (choose your own palette via inline styles or override here) */
.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    color: #17a2b8;
}

/* Count number */
.stat-count {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Label text */
.stat-name {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/*=========================*/
/* Requestor name under title in request cards */
.requestor {
    font-size: 0.875rem; /* slightly smaller than body text */
    color: #ff6a00; /* muted gray to distinguish it */
    margin: 0 0 0.5rem 0; /* space below before description */
    font-style: italic; /* subtle emphasis */
    line-height: 1.4; /* good readability */
}

