/* 
   KPRCAS Faculty Performance Appraisal System - Custom Style Sheet
   Colours:
     Primary Blue: #0d4ea6
     Sidebar Blue: #0b3d91
     Sidebar Green: #00a651
     Background: #f4f7fc
     Card White: #ffffff
     Text Dark: #333333
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #0d4ea6;
    --sidebar-blue: #0b3d91;
    --sidebar-green: #00a651;
    --bg-color: #f4f7fc;
    --card-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-blue);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    border-right: 4px solid var(--sidebar-green);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand img {
    height: 35px;
    border-radius: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-menu-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.75rem 1.5rem 0.25rem;
    font-weight: 600;
}

.sidebar-item {
    margin: 0.25rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.sidebar-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-link:hover i {
    transform: scale(1.1);
}

.sidebar-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 3px 0 0 var(--sidebar-green);
    font-weight: 600;
}

.sidebar-link.active i {
    color: #00ff7f;
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    transition: all var(--transition-speed) ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-custom {
    background-color: var(--card-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-action-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.navbar-action-btn:hover {
    background-color: var(--bg-color);
}

/* Dashboard Cards */
.stat-card {
    background: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Form Styles */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.card-header {
    background-color: var(--card-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.925rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(13, 78, 166, 0.15);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0b3d91;
    border-color: #0b3d91;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--sidebar-green);
    border-color: var(--sidebar-green);
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #008f45;
    border-color: #008f45;
    transform: translateY(-1px);
}

/* Tables */
.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-bottom-width: 1px;
}

.table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Login Portal Styling */
.login-body {
    background: linear-gradient(135deg, #0b3d91 0%, #0d4ea6 50%, #00a651 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--sidebar-green), var(--primary-blue));
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 70px;
    margin-bottom: 0.75rem;
}

.login-title {
    font-size: 1.5rem;
    color: var(--sidebar-blue);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Sticky Save Bar for Forms */
.sticky-save-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 998;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.03);
    transition: all var(--transition-speed) ease;
}

/* Notifications Bell count */
.notification-bell-container {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-white);
}

/* Appraisal Form Styles */
.appraisal-tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.appraisal-tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.appraisal-tab-btn:hover {
    color: var(--primary-blue);
}

.appraisal-tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.criteria-card {
    background-color: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s ease;
}

.criteria-card:hover {
    border-color: #cbd5e1;
}

.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

.criteria-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sidebar-blue);
}

.criteria-max-badge {
    background-color: #eff6ff;
    color: var(--primary-blue);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

/* Responsive adjust */
@media (max-width: 991.98px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.show {
        left: 0;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .sticky-save-bar {
        left: 0;
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .sticky-save-bar > div:last-child {
        margin-left: auto;
    }
}

/* Profile Photo Container */
.profile-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.profile-photo-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-photo-upload-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--primary-blue);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease;
}

.profile-photo-upload-btn:hover {
    background-color: var(--sidebar-blue);
}

/* Hide spin-button controls in number inputs to make them look like normal text boxes */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}