/* ============================================
   Personnel Shared Styles
   Used by: personnel component (home) + personnels page
   ============================================ */

/* ---- Background Pattern ---- */
.personnel-section,
.personnel-page {
    background: linear-gradient(180deg, #011b2b 0%, #021e30 50%, #02253a 100%);
    position: relative;
    overflow: hidden;
}

.personnel-section {
    min-height: 500px;
}

.personnel-page {
    min-height: 100vh;
    padding-top: calc(80px + 120px);
    padding-bottom: 80px;
}

.personnel-section::before,
.personnel-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 102, 204, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 168, 255, 0.04) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* ---- Section Header ---- */
.section-header .header-line,
.page-header .header-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #00a8ff);
    border-radius: 2px;
}

/* ---- Grid Layout ---- */
.personnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}

/* ---- Card ---- */
.personnel-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.personnel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.personnel-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 102, 204, 0.35);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 102, 204, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.personnel-card:hover::before {
    opacity: 1;
}

.personnel-card.expiring-soon {
    border-color: rgba(255, 193, 7, 0.3);
}

.personnel-card.expiring-soon::before {
    background: linear-gradient(90deg, #ffc107, #ff9800);
    opacity: 1;
}

.personnel-card.expired {
    border-color: rgba(220, 53, 69, 0.3);
}

.personnel-card.expired::before {
    background: linear-gradient(90deg, #dc3545, #c82333);
    opacity: 1;
}

/* ---- Card Glow ---- */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.personnel-card:hover .card-glow {
    opacity: 1;
}

/* ---- Photo ---- */
.personnel-photo {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a3d6b 0%, #062a4a 100%);
    position: relative;
    overflow: hidden;
}

.personnel-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(1, 27, 43, 0.6), transparent);
    pointer-events: none;
}

.personnel-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.personnel-card:hover .personnel-photo img {
    transform: scale(1.08);
}

.photo-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.personnel-card:hover .photo-placeholder {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
    border-color: rgba(0, 168, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.2);
}

.photo-placeholder span {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ---- Badges ---- */
.alert-badge, .valid-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alert-badge.warning {
    background: rgba(255, 193, 7, 0.95);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    animation: pulse 2s infinite;
}

.alert-badge.expired {
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
    animation: pulse 1.5s infinite;
}

.valid-badge {
    background: rgba(40, 167, 69, 0.95);
    color: #fff;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ---- Card Content ---- */
.personnel-content {
    padding: 1.25rem;
}

.personnel-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.01em;
}

/* ---- Status Badge ---- */
.personnel-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 0 auto 0.75rem;
    width: fit-content;
    display: flex;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.personnel-status-badge.status-active {
    background: rgba(40, 167, 69, 0.12);
    color: #3dd66f;
    border: 1px solid rgba(40, 167, 69, 0.25);
}

.personnel-status-badge.status-inactive {
    background: rgba(255, 193, 7, 0.12);
    color: #ffca2c;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.personnel-status-badge i {
    font-size: 0.65rem;
}

/* ---- Meta Info ---- */
.personnel-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.84rem;
}

.meta-item i {
    color: #3b8dd4;
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
}

/* ---- Certifications Section ---- */
.certifications-section {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 12px;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.section-title i {
    color: #3b8dd4;
}

.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 180px;
    overflow-y: auto;
}

.certifications-list::-webkit-scrollbar {
    width: 4px;
}

.certifications-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
}

.certifications-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.certifications-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ---- Cert Items ---- */
.cert-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.cert-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cert-item.warning {
    background: rgba(255, 193, 7, 0.06);
}

.cert-item.warning:hover {
    background: rgba(255, 193, 7, 0.1);
}

.cert-item.expired {
    background: rgba(220, 53, 69, 0.06);
}

.cert-item.expired:hover {
    background: rgba(220, 53, 69, 0.1);
}

.cert-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(0, 102, 204, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #4da6ff;
    flex-shrink: 0;
}

.cert-item.warning .cert-icon {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.cert-item.expired .cert-icon {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.cert-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cert-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.cert-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.cert-status.valid {
    background: rgba(40, 167, 69, 0.15);
    color: #3dd66f;
}

.cert-status.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffca2c;
}

.cert-status.expired {
    background: rgba(220, 53, 69, 0.15);
    color: #e8616e;
}

/* ---- No Certifications ---- */
.no-certifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

.no-certifications i {
    font-size: 1.5rem;
    opacity: 0.7;
}

/* ---- Critical Alert ---- */
.critical-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.critical-alert.valid {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.critical-alert.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.critical-alert.expired {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.critical-alert.valid .alert-icon {
    background: rgba(40, 167, 69, 0.25);
    color: #28a745;
}

.critical-alert.warning .alert-icon {
    background: rgba(255, 193, 7, 0.25);
    color: #ffc107;
}

.critical-alert.expired .alert-icon {
    background: rgba(220, 53, 69, 0.25);
    color: #dc3545;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.alert-type {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.critical-alert.valid .alert-text { color: #28a745; }
.critical-alert.warning .alert-text { color: #ffc107; }
.critical-alert.expired .alert-text { color: #dc3545; }

.alert-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* ---- Animation ---- */
.personnel-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.personnel-card:nth-child(1) { animation-delay: 0.05s; }
.personnel-card:nth-child(2) { animation-delay: 0.1s; }
.personnel-card:nth-child(3) { animation-delay: 0.15s; }
.personnel-card:nth-child(4) { animation-delay: 0.2s; }
.personnel-card:nth-child(5) { animation-delay: 0.25s; }
.personnel-card:nth-child(6) { animation-delay: 0.3s; }
.personnel-card:nth-child(7) { animation-delay: 0.35s; }
.personnel-card:nth-child(8) { animation-delay: 0.4s; }
.personnel-card:nth-child(n+9) { animation-delay: 0.45s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- View More Button ---- */
.btn-view-more {
    display: inline-flex;
    align-items: center;
    padding: 14px 40px;
    background: linear-gradient(135deg, #0066cc 0%, #004080 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-view-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00a8ff 0%, #0066cc 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-view-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-view-more:hover::before {
    opacity: 1;
}

.btn-view-more i {
    transition: transform 0.3s ease;
}

.btn-view-more:hover i {
    transform: translateX(5px);
}

/* ---- Back to Home Button ---- */
.btn-back-home {
    display: inline-flex;
    align-items: center;
    padding: 14px 40px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-back-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 168, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-back-home:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 102, 204, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.btn-back-home:hover::before {
    opacity: 1;
}

.btn-back-home i {
    transition: transform 0.3s ease;
}

.btn-back-home:hover i {
    transform: translateX(-5px);
}

/* ============================================
   Search Bar (personnels page only)
   ============================================ */
.search-bar-wrapper {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.35s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 102, 204, 0.5);
    box-shadow:
        0 0 0 4px rgba(0, 102, 204, 0.08),
        0 4px 20px rgba(0, 102, 204, 0.12);
}

.search-input:focus ~ .search-icon,
.search-bar:focus-within .search-icon {
    color: #4da6ff;
}

.search-clear {
    position: absolute;
    right: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.45);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.25s ease;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.05);
}

.search-results-count {
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.84rem;
    margin-top: 0.75rem;
    min-height: 1.25rem;
    letter-spacing: 0.02em;
}

.personnel-card.search-hidden {
    display: none;
}

.no-search-results {
    display: none;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    padding: 3rem 1rem;
    font-size: 1rem;
    grid-column: 1 / -1;
}

.no-search-results i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.7;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-dark {
    background: linear-gradient(180deg, #011b2b 0%, #02253a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.modal-dark .modal-header {
    background: rgba(0, 102, 204, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
}

.modal-dark .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-dark .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-dark .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.modal-dark .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.modal-dark .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.modal-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 102, 204, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-photo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a3d6b 0%, #062a4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(0, 102, 204, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-photo-placeholder span {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
}

.modal-subtitle i {
    color: #3b8dd4;
    width: 16px;
}

.modal-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.modal-section-title i {
    color: #3b8dd4;
}

.modal-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.modal-cert-card {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.modal-cert-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-cert-card.valid {
    border-color: rgba(40, 167, 69, 0.25);
}

.modal-cert-card.warning {
    border-color: rgba(255, 193, 7, 0.25);
}

.modal-cert-card.expired {
    border-color: rgba(220, 53, 69, 0.25);
}

.modal-cert-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
}

.modal-cert-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.modal-cert-card.valid .modal-cert-icon {
    background: rgba(40, 167, 69, 0.15);
    color: #3dd66f;
}

.modal-cert-card.warning .modal-cert-icon {
    background: rgba(255, 193, 7, 0.15);
    color: #ffca2c;
}

.modal-cert-card.expired .modal-cert-icon {
    background: rgba(220, 53, 69, 0.15);
    color: #e8616e;
}

.modal-cert-title {
    flex: 1;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.modal-cert-status .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.status-badge.valid {
    background: rgba(40, 167, 69, 0.15);
    color: #3dd66f;
}

.status-badge.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffca2c;
}

.status-badge.expired {
    background: rgba(220, 53, 69, 0.15);
    color: #e8616e;
}

.modal-cert-details {
    padding: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.84rem;
}

.detail-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.84rem;
    font-weight: 500;
}

.modal-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.35);
    gap: 1rem;
}

.modal-no-data i {
    font-size: 3rem;
    opacity: 0.6;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .personnel-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .personnel-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .personnel-photo {
        height: 160px;
    }

    .personnel-content {
        padding: 1rem;
    }

    .modal-cert-grid {
        grid-template-columns: 1fr;
    }

    .modal-photo, .modal-photo-placeholder {
        width: 50px;
        height: 50px;
    }

    .modal-photo-placeholder span {
        font-size: 1.4rem;
    }

    .modal-cert-header {
        flex-wrap: wrap;
    }

    .modal-cert-status {
        width: 100%;
        margin-top: 0.5rem;
    }

    .search-input {
        padding: 13px 46px 13px 46px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .personnel-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .personnel-photo {
        height: 180px;
    }

    .certifications-list {
        max-height: 150px;
    }

    .search-bar-wrapper {
        padding: 0 0.25rem;
    }
}

/* ============================================
   Personnel Password Overlay
   ============================================ */
.personnel-password-overlay {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem 1rem;
    background: linear-gradient(180deg, #011b2b 0%, #021e30 50%, #02253a 100%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.personnel-password-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.personnel-password-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(0, 102, 204, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(0, 168, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.password-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(0, 102, 204, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: passwordCardIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes passwordCardIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.password-lock-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.2) 0%, rgba(0, 168, 255, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 102, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.password-lock-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0, 168, 255, 0.1), transparent);
    animation: lockRotate 4s linear infinite;
}

@keyframes lockRotate {
    to { transform: rotate(360deg); }
}

.password-lock-icon i {
    font-size: 1.4rem;
    color: #4da6ff;
    position: relative;
    z-index: 1;
}

.password-card h3 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.password-card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.password-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.password-input-group input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.35s ease;
    letter-spacing: 0.15em;
}

.password-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.05em;
}

.password-input-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 102, 204, 0.5);
    box-shadow:
        0 0 0 4px rgba(0, 102, 204, 0.08),
        0 4px 20px rgba(0, 102, 204, 0.12);
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.25s ease;
}

.password-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.password-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0066cc 0%, #004080 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.password-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00a8ff 0%, #0066cc 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.35);
}

.password-submit-btn:hover::before {
    opacity: 1;
}

.password-submit-btn span,
.password-submit-btn i {
    position: relative;
    z-index: 1;
}

.password-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.password-error-msg {
    color: #e8616e;
    font-size: 0.84rem;
    margin-top: 0.75rem;
    min-height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.password-error-msg.show {
    opacity: 1;
    transform: translateY(0);
}

.password-error-msg i {
    font-size: 0.75rem;
}

/* Shake animation for wrong password */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.password-card.shake {
    animation: shake 0.5s ease-in-out;
}

/* Loading spinner */
.password-submit-btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.password-submit-btn.loading .spinner {
    display: block;
}

.password-submit-btn.loading .btn-text,
.password-submit-btn.loading .btn-icon {
    display: none;
}

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

