﻿/** CLF PES - CLF Performance Evaluation System Styles */

body {
    padding-top: 20px;
    padding-bottom: 20px;
    background: #f5f5f5;
    font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
    font-size: 14px;
}

/* ==========================================
   LOGIN PAGE STYLES
   ========================================== */

body.login-page {
    background-color: white;
    padding-top: 40px;
    padding-bottom: 40px;
}

.login-container {
    max-width: 450px;
    margin: 0 auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container img {
    max-width: 180px;
    height: auto;
}

.login-page .panel {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.login-page .panel-heading {
    background: linear-gradient(to bottom, #4b6c9e 0%, #3a5a8e 100%);
    color: #fff;
    text-align: center;
    padding: 20px;
}

.login-page .panel-heading h3 {
    margin: 0;
    font-weight: 300;
    font-size: 24px;
}

.login-page .panel-body {
    padding: 30px;
    background-color: #fff;
}

.btn-google {
    width: 100%;
    padding: 12px;
    background-color: #2aabd2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-google:hover {
    background-color: #1b8db0;
    color: white;
}

.btn-google:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 171, 210, 0.3);
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider span {
    padding: 0 15px;
    color: #999;
    font-size: 13px;
    text-transform: uppercase;
}

.debug-section {
    background-color: #fcf8e3;
    border: 1px solid #f0ad4e;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.debug-section h5 {
    color: #8a6d3b;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.debug-section h5 i {
    margin-right: 5px;
}

.btn-debug {
    background-color: #f0ad4e;
    border-color: #eea236;
    color: #fff;
    width: 100%;
    padding: 10px;
    font-size: 15px;
}

.btn-debug:hover {
    background-color: #ec971f;
    border-color: #d58512;
    color: #fff;
}

.login-page .panel-footer {
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 15px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: #666;
}

.footer-text {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.login-page .alert {
    border-radius: 4px;
}

/* ==========================================
   NAVBAR STYLES
   ========================================== */

.navbar-brand img {
    display: inline-block;
    margin-top: -5px;
    margin-right: 10px;
}

.navbar-default {
    background: linear-gradient(to bottom, #4b6c9e 0%, #3a5a8e 100%);
    border-color: #2d4a73;
}

.navbar-default .navbar-brand {
    color: #fff;
    font-weight: 500;
}

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
    color: #f0f0f0;
}

.navbar-default .navbar-nav > li > a {
    color: #e8e8e8;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Active menu item */
.navbar-default .navbar-nav > li.active > a,
.navbar-default .navbar-nav > li.active > a:hover,
.navbar-default .navbar-nav > li.active > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

/* Dropdown open state */
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.navbar-default .navbar-nav > .nav-user-dropdown.open > a,
.navbar-default .navbar-nav > .nav-user-dropdown.open > a:hover,
.navbar-default .navbar-nav > .nav-user-dropdown.open > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.navbar-default .navbar-toggle {
    border-color: #fff;
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: #fff;
}

.navbar-default .navbar-text {
    color: #e8e8e8;
}

/* Dropdown menu styling */
.navbar-nav .dropdown-menu {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 6px 12px rgba(0,0,0,0.175);
    min-width: 160px;
}

.navbar-nav .dropdown-menu > li > a {
    color: #333;
    padding: 10px 20px;
    display: block;
}

.navbar-nav .dropdown-menu > li > a:hover,
.navbar-nav .dropdown-menu > li > a:focus {
    background-color: #f5f5f5;
    color: #262626;
}

.navbar-nav .dropdown-menu .divider {
    background-color: #e5e5e5;
}

/* Icon colors for menu items */
.nav-dashboard a::before {
    content: "\f0e4";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #ffd700;
}

.nav-cycles a::before {
    content: "\f073";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #87ceeb;
}

.nav-evaluations a::before {
    content: "\f0ea";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #98fb98;
}

.nav-employees a::before {
    content: "\f0c0";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #ffa07a;
}

.nav-reminders a::before {
    content: "\f0f3";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #ffb6c1;
}

.nav-reviews a::before {
    content: "\f00c";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #dda0dd;
}

.nav-my-evaluation a::before {
    content: "\f15c";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #f0e68c;
}

.nav-user-dropdown .dropdown-toggle::before {
    content: "\f007";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
}

.nav-logout a::before {
    content: "\f08b";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 6px;
    color: #ff6347;
}

/* ==========================================
   GENERAL LAYOUT
   ========================================== */

.dl-horizontal dt {
    white-space: normal;
}

input,
select,
textarea {
    max-width: 100%;
}

/* ==========================================
   PANELS
   ========================================== */

.panel {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.panel-heading {
    font-weight: 500;
}

/* ==========================================
   BADGES - Evaluation Status
   ========================================== */

/* Base badge styling for all status badges */
.badge {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Evaluation Status Badges - 8 statuses */
.badge-hr-initiated {
    background-color: #5bc0de;  /* Light Blue - Not started */
    color: #fff;
}

.badge-supervisor-pending {
    background-color: #f0ad4e;  /* Orange - In progress */
    color: #fff;
}

.badge-supervisor-submitted {
    background-color: #5cb85c;  /* Green - Completed step */
    color: #fff;
}

.badge-employee-pending {
    background-color: #f39c12;  /* Gold - Awaiting action */
    color: #fff;
}

.badge-employee-submitted {
    background-color: #27ae60;  /* Darker Green - Completed step */
    color: #fff;
}

.badge-reviewer-pending {
    background-color: #e67e22;  /* Dark Orange - Awaiting action */
    color: #fff;
}

.badge-reviewer-submitted {
    background-color: #16a085;  /* Teal - Completed step */
    color: #fff;
}

.badge-completed {
    background-color: #2ecc71;  /* Bright Green - Final status */
    color: #fff;
}

/* Cycle Status Badges */
.badge-complete {
    background-color: #2ecc71;  /* Bright Green - Completed/Initiated */
    color: #fff;
}

.badge-pending {
    background-color: #95a5a6;  /* Gray - Not yet started */
    color: #fff;
}

.badge-success {
    background-color: #27ae60;  /* Green - Active/Success */
    color: #fff;
}

.badge-closed {
    background-color: #7f8c8d;  /* Dark Gray - Closed/Inactive */
    color: #fff;
}

/* Special Status Badges */
.badge-overdue {
    background-color: #d9534f;  /* Red - Attention needed */
    color: #fff;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.badge-info {
    background-color: #5bc0de;  /* Light Blue - Fallback/info */
    color: #fff;
}

/* Pulse animation for overdue badge */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ==========================================
   TABLES
   ========================================== */

.table-actions {
    white-space: nowrap;
    width: 1%;
}

.table-actions .btn {
    margin-right: 5px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table-hover > tbody > tr:hover {
    background-color: #f0f0f0;
}

/* ==========================================
   PAGE HEADER
   ========================================== */

.page-header {
    border-bottom: 2px solid #4b6c9e;
    margin-bottom: 20px;
}

.page-header h2 {
    color: #333;
    font-weight: 400;
}

/* ==========================================
   JUMBOTRON
   ========================================== */

.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.jumbotron h1 {
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.jumbotron .lead {
    font-weight: 300;
}

/* ==========================================
   FORMS
   ========================================== */

.control-label {
    padding-top: 0px !important;
    font-weight: bold;
}

.text-danger {
    font-weight: bold;
    color: red;
}

div dl dt {
    font-weight: bold;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    border-radius: 3px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4b6c9e;
    border-color: #3a5a8e;
}

.btn-primary:hover {
    background-color: #3a5a8e;
    border-color: #2d4a73;
}

/* ==========================================
   UTILITIES
   ========================================== */

.hiddenB {
    display: none;
}

/* Loading spinner overlay */
.loading {
    position: fixed;
    z-index: 999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
}

/* ==========================================
   PRINT STYLES
   ========================================== */

/* Hide print header on screen, show only when printing */
.print-header {
    display: none;
}

@media print {
/* Show print header only when printing - HIGHEST PRIORITY */
.print-header,
div.print-header {
    display: block !important;
    visibility: visible !important;
    page-break-after: avoid;
    margin-bottom: 10px !important;
    opacity: 1 !important;
}

.print-header *,
div.print-header * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.print-header img {
    display: block !important;
    max-width: 150px !important;
    height: auto !important;
    margin: 0 auto !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.print-header h2 {
    display: block !important;
    font-size: 14pt !important;
    margin: 8px 0 4px 0 !important;
    color: #000 !important;
}

.print-header p {
    display: block !important;
    font-size: 9pt !important;
    color: #666 !important;
    margin: 0 !important;
}

/* Set page size and minimal margins for maximum space */
    @page {
        size: letter portrait;
        margin: 0.3in 0.3in 0.3in 0.3in;
    }

    /* Hide navigation, buttons, and alerts when printing */
    .no-print,
    .navbar,
    .page-header:not(.print-header) .pull-right,
    footer,
    .alert {
        display: none !important;
    }

    /* Hide UI buttons but NOT rating buttons */
    .btn:not(.btn-rating),
    button:not(.btn-rating) {
        display: none !important;
    }

    /* Show rating buttons in print */
    .btn-rating {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        page-break-inside: avoid;
    }

    /* Ensure rating button icons and text display together */
    .btn-rating .glyphicon {
        margin-right: 2px !important;
        display: inline-block !important;
        font-size: 8pt !important;
    }

    /* Ensure rating colors print correctly */
    .btn-rating.rating-color-0,
    .btn-rating.rating-color-1,
    .btn-rating.rating-color-2,
    .btn-rating.rating-color-3 {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Make active rating more prominent in print */
    .btn-rating.active {
        border-width: 2px !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Dim non-active ratings for better contrast */
    .btn-rating:not(.active) {
        opacity: 0.3 !important;
        filter: grayscale(30%) !important;
    }

    /* Ensure rating group displays properly - side by side */
    .btn-group-rating {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
        page-break-inside: avoid;
        margin-bottom: 4px !important;
    }

    /* Make rating buttons display side-by-side instead of stacked */
    .btn-rating {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        white-space: nowrap !important;
        font-size: 7.5pt !important;
        padding: 4px 6px !important;
        line-height: 1.2 !important;
    }

    /* Adjust page layout for printing - ultra compact */
    body {
        background: white !important;
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
        color: #000 !important;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Reduce heading sizes significantly */
    h1, h2, h3, h4, h5, h6 {
        margin-top: 4px !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 13pt !important;
    }

    h3 {
        font-size: 10pt !important;
    }

    h4 {
        font-size: 9pt !important;
        font-weight: 600 !important;
    }

    .page-header {
        margin: 0 0 6px 0 !important;
        padding-bottom: 3px !important;
        border-bottom: 1px solid #ddd !important;
    }

    .page-header h2 {
        margin: 0 !important;
        font-size: 13pt !important;
    }

    /* Force Bootstrap columns to stay side-by-side */
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        float: left !important;
        position: relative !important;
        min-height: 1px !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .col-md-6 {
        width: 50% !important;
    }

    .col-md-4 {
        width: 33.333% !important;
    }

    .col-md-3 {
        width: 25% !important;
    }

    .col-md-12 {
        width: 100% !important;
    }

    /* Keep row clearfix */
    .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
        margin-bottom: 4px !important;
    }

    .row::before,
    .row::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }

    /* Panel styling for print - ultra compact */
    .panel {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 5px !important;
    }

    /* Panel headings - preserve colors */
    .panel-heading {
        background-color: #f5f5f5 !important;
        border-bottom: 1px solid #ccc !important;
        padding: 3px 6px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
    }

    .panel-heading .panel-title {
        font-size: 12pt !important;
        margin: 0 !important;
        font-weight: 600 !important;
    }

    .panel-primary > .panel-heading {
        background-color: #337ab7 !important;
        color: #fff !important;
        border-color: #2e6da4 !important;
    }

    .panel-primary > .panel-heading .panel-title {
        color: #fff !important;
    }

    .panel-info > .panel-heading {
        background-color: #d9edf7 !important;
        color: #31708f !important;
        border-color: #bce8f1 !important;
    }

    .panel-info > .panel-heading .panel-title {
        color: #31708f !important;
    }

    .panel-default > .panel-heading .panel-title {
        color: #333 !important;
    }

    .panel-body {
        padding: 5px 6px !important;
    }

    /* Ensure nested rows and columns work in panels */
    .panel-body .row {
        display: block !important;
        margin-bottom: 0 !important;
    }

    .panel-body .col-md-6 {
        float: left !important;
        width: 50% !important;
    }

    /* Ensure tables fit on page */
    .table-responsive {
        overflow: visible !important;
    }

    table {
        width: 100% !important;
        page-break-inside: auto;
        font-size: 8pt !important;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    /* Make sure badges and labels are visible with colors */
    .badge,
    .label {
        border: 1px solid #333 !important;
        padding: 1px 4px !important;
        font-size: 7.5pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
        line-height: 1.2 !important;
    }

    /* Preserve badge colors */
    .badge-hr-initiated,
    .badge-supervisor-pending,
    .badge-supervisor-submitted,
    .badge-employee-pending,
    .badge-employee-submitted,
    .badge-reviewer-pending,
    .badge-reviewer-submitted,
    .badge-completed,
    .badge-info,
    .badge-complete {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Ensure evaluation items are readable and stay together - ultra compact */
    .evaluation-item {
        page-break-inside: avoid;
        margin-bottom: 6px !important;
        padding-bottom: 6px !important;
        border-bottom: 1px solid #ddd !important;
    }

    .evaluation-item h4 {
        margin-top: 0 !important;
        margin-bottom: 2px !important;
        font-size: 9pt !important;
    }

    .evaluation-item p {
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
        font-size: 7pt !important;
    }

    /* Item description text specifically */
    .evaluation-item div > p,
    .item-description,
    p.item-description {
        font-size: 6.5pt !important;
        line-height: 1.1 !important;
        margin: 0 !important;
        padding-left: 12px !important;
        color: #555 !important;
    }

    .evaluation-item .text-muted {
        font-size: 7.5pt !important;
        margin-bottom: 2px !important;
        line-height: 1.2 !important;
    }

    /* Rating section spacing */
    .rating-section {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    /* Comment section spacing */
    .comment-section {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .rating-section label {
        font-size: 8.5pt !important;
        margin-bottom: 2px !important;
        font-weight: 600 !important;
    }

    /* Make comment sections visible - ultra compact */
    .comment-section .well,
    .well {
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
        background-color: #f9f9f9 !important;
        padding: 4px !important;
        margin-bottom: 4px !important;
        font-size: 8pt !important;
        line-height: 1.2 !important;
        min-height: 61px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Adjust well height when there's no reviewer */
    .no-reviewer .well,
    .no-reviewer .well-sm {
        min-height: 115px !important;
    }

    .well-sm {
        min-height: 61px !important;
        padding: 4px !important;
    }

    /* Definition lists formatting - side-by-side layout */
    .dl-horizontal {
        margin-bottom: 3px !important;
        font-size: 8pt !important;
        line-height: 1.2 !important;
    }

    .dl-horizontal dt {
        float: left !important;
        width: 100px !important;
        clear: left !important;
        text-align: left !important;
        font-weight: bold !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal !important;
        margin-bottom: 2px !important;
    }

    .dl-horizontal dd {
        margin-left: 105px !important;
        margin-bottom: 2px !important;
        overflow: hidden;
    }

    /* Force line breaks to work in definition lists */
    .dl-horizontal dd br {
        display: block !important;
        content: "" !important;
        margin: 2px 0 !important;
    }

    /* Ensure email addresses display on new line */
    .dl-horizontal dd small,
    .dl-horizontal dd .text-muted {
        display: block !important;
        margin-top: 2px !important;
        font-size: 7pt !important;
        line-height: 1.2 !important;
    }

    /* Ensure strong tags display properly */
    .dl-horizontal dd strong {
        display: block !important;
        margin-bottom: 2px !important;
    }

    /* Clear floats after dl-horizontal */
    .dl-horizontal::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Preserve text colors */
    .text-success {
        color: #3c763d !important;
    }

    .text-warning {
        color: #8a6d3b !important;
    }

    .text-danger {
        color: #a94442 !important;
    }

    .text-muted {
        color: #777 !important;
        font-size: 7.5pt !important;
    }

    /* Glyphicons in print */
    .glyphicon {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 8pt !important;
    }

    /* Page breaks - try to avoid but allow if needed */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    /* Avoid widows and orphans */
    p {
        orphans: 2;
        widows: 2;
    }

    /* Links - show URL for external links */
    a[href^="http"]:after {
        content: "" !important;
    }

    /* Keep form groups together */
    .form-group {
        page-break-inside: avoid;
    }

    /* Reduce list spacing */
    ul, ol {
        margin-bottom: 4px !important;
        padding-left: 20px !important;
    }

    li {
        margin-bottom: 1px !important;
        font-size: 8pt !important;
        line-height: 1.2 !important;
    }

    /* Alerts - hidden for space */
    .alert {
        display: none !important;
    }

    /* Small text even smaller */
    small, .small {
        font-size: 7pt !important;
        line-height: 1.2 !important;
    }

    /* Strong/bold text */
    strong, b {
        font-weight: 600 !important;
    }

    /* Textarea and input display */
    textarea,
    input[type="text"],
    .form-control {
        font-size: 8pt !important;
        padding: 2px 4px !important;
        border: 1px solid #ccc !important;
    }

    /* Hide empty elements - but not print-header */
    *:empty:not(.print-header):not(.print-header *) {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .navbar-default .navbar-nav .open .dropdown-menu > li > a {
        color: #fff;
    }
}