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

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Body (Post-Login) */
body {
    font-family: 'Manrope', 'Inter', sans-serif;
    background-color: #f4f8f8;
    color: #2D3748;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 110px;
    -webkit-font-smoothing: antialiased;
}

/* Header Layout */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
    border-bottom: 1px solid #d6e4e4;
    box-shadow: 0 4px 20px rgba(178, 197, 197, 0.15);
    z-index: 1000;
    transition: all 0.25s ease;
}

.search-header-content {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.search-main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 800px;
}

.advanced-toggle-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    width: 100%;
    max-width: 800px;
}

/* Search Input */
#search-input {
    flex-grow: 1;
    padding: 12px 18px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    border: 2px solid #b2c5c5;
    border-radius: 12px;
    outline: none;
    background: #FFFFFF;
    color: #2D3748;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(178, 197, 197, 0.08);
}

#search-input::placeholder {
    color: #94a3b8;
}

#search-input:focus {
    border-color: #9fc4c6;
    box-shadow: 0 0 0 4px rgba(178, 197, 197, 0.25);
}

/* Secondary Advanced Toggle Button inside Search Bar */
#toggle-advanced-btn,
.secondary-btn {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    border: 1.5px solid #b2c5c5;
    border-radius: 12px;
    background: #f4f8f8;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(178, 197, 197, 0.08);
}

#toggle-advanced-btn:hover,
.secondary-btn:hover {
    border-color: #9fc4c6;
    color: #2D3748;
    background: #e4efef;
}

#toggle-advanced-btn.active,
.secondary-btn.active {
    background: #9fc4c6;
    border-color: #9fc4c6;
    color: #1A202C;
}

.chevron-icon {
    transition: transform 0.25s ease;
}

.secondary-btn.active .chevron-icon {
    transform: rotate(180deg);
}

/* Search Button (#b2c5c5 theme) */
#search-button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #b2c5c5 0%, #9fc4c6 100%);
    color: #2D3748;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(178, 197, 197, 0.4);
}

#search-button:hover {
    background: linear-gradient(135deg, #c5d8d8 0%, #b2c5c5 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(178, 197, 197, 0.55);
}

#search-button:active {
    transform: scale(0.98);
}

/* Advanced Search Right-Side Vertical Panel (Drawer) */
.advanced-panel {
    position: fixed;
    top: 75px;
    right: 0;
    width: 360px;
    max-width: 90vw;
    height: calc(100vh - 75px);
    background: #FFFFFF;
    border-left: 1px solid #d6e4e4;
    box-shadow: -4px 6px 20px rgba(45, 55, 72, 0.1);
    z-index: 900;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.advanced-panel.open {
    transform: translateX(0);
}

.panel-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #d6e4e4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 4px;
}

.panel-subtitle {
    font-size: 13px;
    color: #718096;
}

.close-panel-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-panel-btn:hover {
    background: #f4f8f8;
    color: #2D3748;
}

.panel-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 12px 14px;
    font-size: 14px;
    border: 1.5px solid #b2c5c5;
    border-radius: 10px;
    outline: none;
    background: #FFFFFF;
    color: #2D3748;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus {
    border-color: #9fc4c6;
    box-shadow: 0 0 0 4px rgba(178, 197, 197, 0.25);
}

.dual-input-group {
    display: flex;
    gap: 10px;
}

.input-subgroup {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-prefix-label {
    font-size: 11px;
    font-weight: 500;
    color: #718096;
}

.panel-actions {
    padding: 18px 24px;
    border-top: 1px solid #d6e4e4;
    background: #f4f8f8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-clear {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #d6e4e4;
    background: #FFFFFF;
    color: #4a5568;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: #f4f8f8;
    border-color: #b2c5c5;
    color: #2D3748;
}

.btn-apply {
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    background: linear-gradient(135deg, #b2c5c5 0%, #9fc4c6 100%);
    color: #2D3748;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(178, 197, 197, 0.35);
    transition: all 0.2s ease;
}

.btn-apply:hover {
    background: linear-gradient(135deg, #c5d8d8 0%, #b2c5c5 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(178, 197, 197, 0.45);
}

/* Admin Avatar */
.admin-logo {
    position: absolute;
    right: 0;
    top: 2px;
}

/* Password Show/Hide Toggle Styles */
.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-field-wrapper input {
    width: 100%;
    padding-right: 44px !important;
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #718096;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
}

.toggle-password-btn:hover {
    color: #2D3748;
    background-color: rgba(178, 197, 197, 0.25);
}

.toggle-password-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7dfe0 0%, #9fc5c6 100%);
    color: #2D3748;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(45, 55, 72, 0.08);
    box-shadow: 0 4px 15px rgba(178, 197, 197, 0.35);
    transition: all 0.25s ease;
}

.avatar:hover {
    transform: translateY(-2px) scale(1.04);
    background: linear-gradient(135deg, #d7ebec 0%, #b8d5d6 100%);
    box-shadow: 0 8px 20px rgba(178, 197, 197, 0.45);
}

/* Classic Login Page Styles */
.login-body {
    background-color: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: 0;
}

.login-container {
    background: #FFFFFF;
    padding: 44px 40px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #E2E8F0;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.login-title {
    font-size: 28px;
    font-weight: 800;
    color: #2D3748;
    margin-bottom: 6px;
    letter-spacing: -0.4px;
    font-family: 'Manrope', sans-serif;
}

.login-subtitle {
    font-size: 14px;
    color: #718096;
    margin-bottom: 32px;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    border: 1.5px solid #b7cbe6;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background: #FFFFFF;
    color: #2D3748;
}

.input-group input::placeholder {
    color: #A0AEC0;
}

.input-group input:focus {
    border-color: #8FB8C9;
    box-shadow: 0 0 0 3px rgba(143, 184, 201, 0.22);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    font-size: 13.5px;
    color: #718096;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #8FB8C9;
    border-radius: 4px;
    cursor: pointer;
}

.forgot-link {
    color: #718096;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #2D3748;
    text-decoration: underline;
}

/* Classic Button */
.login-button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    border: none;
    border-radius: 12px;
    background: #A8CFCF;
    color: #2D3748;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(168, 207, 207, 0.35);
}

.login-button:hover {
    background: #8FB8C9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(143, 184, 201, 0.4);
}

.login-button:active {
    transform: scale(0.99);
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #d6e4e4;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(178, 197, 197, 0.25);
    min-width: 220px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    transform-origin: top right;
    animation: scaleIn 0.2s ease-out;
    overflow: hidden;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-header {
    padding: 16px 20px;
    font-weight: 700;
    color: #2D3748;
    font-size: 15px;
    background: #eaf2f2;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid #d6e4e4;
    margin: 0;
}

.dropdown-item {
    padding: 13px 20px;
    text-decoration: none;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f0f7f7;
    padding-left: 24px;
    color: #2D3748;
}

.dropdown-item.text-danger {
    color: #E53E3E;
}

.dropdown-item.text-danger:hover {
    background-color: #FFF5F5;
    color: #C53030;
}

/* Search Results UI Update */
#results-container {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.result-card {
    background: #FFFFFF;
    border: 1px solid #d6e4e4;
    padding: 22px 26px;
    margin-bottom: 18px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(178, 197, 197, 0.1);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideUp 0.35s ease-out forwards;
    opacity: 0;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(178, 197, 197, 0.22);
    border-color: #b2c5c5;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.result-table-name {
    display: inline-block;
    padding: 4px 12px;
    background: #eaf2f2;
    color: #2D3748;
    border: 1px solid #b2c5c5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: max-content;
    margin-bottom: 4px;
}

.result-row {
    display: flex;
    font-size: 14.5px;
}

.result-label {
    font-weight: 600;
    color: #718096;
    width: 140px;
    flex-shrink: 0;
}

.result-value {
    color: #2D3748;
}