/* === Typography === */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;900&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
}

input,
textarea,
select,
button {
    font-family: 'Roboto', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-bold {
    font-weight: 900 !important;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main container */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* Content section for layout consistency */
.content-section {
    text-align: left;
}

/* Search success message */
.search-success {
    background-color: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.search-success .success-icon {
    width: 40px;
    height: 40px;
    background-color: #0ea5e9;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
}

.search-success p {
    margin: 8px 0;
    color: #0f172a;
}

.search-success .note {
    font-size: 14px;
    color: #64748b;
    font-style: italic;
}

/* Logo section */
.logo-section {
    margin-bottom: 0.8rem;
}

.hp-logo {
    width: 80px;
    height: 80px;
    background-color: #e5e7eb;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.hp-logo span {
    font-size: 32px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: -1px;
}

/* Title section */
.title-section {
    margin-bottom: 1.5rem;
}

.main-title {
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
}

.subtitle {
    font-size: 16px;
    color: #6b7280;
    font-weight: 400;
}

/* Form styles */
.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Forgot password */
.forgot-password {
    text-align: right;
    margin: 1rem 0;
}

.forgot-link {
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #374151;
    text-decoration: underline;
}

/* Login button */
.login-button {
    width: 100%;
    background-color: #ffad00;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-button:hover {
    background-color: #e49c00;
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-arrow {
    width: 16px;
    height: 16px;
}

/* Error styles */
.error-summary {
    /* background-color: #fef2f2;
    border: 1px solid #fecaca; */
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* Hide/collapse summary when there are no errors */
.validation-summary-valid.error-summary {
    display: none;
    padding: 0;
    margin: 0;
    border: 0;
}

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

.form-input.input-validation-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .hp-logo {
        width: 64px;
        height: 64px;
    }

    .hp-logo span {
        font-size: 24px;
    }

    .main-title {
        font-size: 24px;
    }

    .form-input {
        padding: 14px 16px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Confirmation page styles */
.confirmation-content {
    text-align: center;
}

.confirmation-icon {
    margin-bottom: 24px;
}

.confirmation-message {
    margin-bottom: 32px;
}

.confirmation-message p {
    font-size: 16px;
    color: #374151;
    margin-bottom: 12px;
    line-height: 1.5;
}

.confirmation-message .sub-message {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 0;
}

.confirmation-actions .login-button {
    display: inline-flex;
    width: auto;
    min-width: 200px;
    text-decoration: none;
}

/* Mobile Layout Styles */
.mobile-layout {
    background-color: #f8f9fa;
    display: block;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Mobile Topbar */
.mobile-topbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-logo {
    width: 36px;
    height: 36px;
    background-color: #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-logo span {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.role {
    font-size: 12px;
    color: #6b7280;
}

.topbar-right {
    display: flex;
    align-items: center;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.dropdown-toggle i:first-child {
    font-size: 20px;
}

.dropdown-toggle i:last-child {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"] i:last-child {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    color: #6b7280;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 4px 0;
}

/* Main Content */
.mobile-main-content {
    padding-top: 60px;
    /* Account for fixed topbar */
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.content-header {
    background: white;
    padding: 20px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.content-body {
    flex: 1;
    padding: 20px 16px;
}

/* Form adjustments for mobile layout */
.mobile-layout .login-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.mobile-layout .search-success {
    margin-bottom: 20px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .form-input {
        padding: 16px;
    }

    .login-button {
        padding: 18px 24px;
        min-height: 56px;
    }

    .dropdown-toggle {
        padding: 12px;
    }

    .dropdown-item {
        padding: 16px;
        font-size: 16px;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-topbar {
        padding: 10px 12px;
        height: 56px;
    }

    .mobile-main-content {
        padding-top: 56px;
        min-height: calc(100vh - 56px);
    }

    .mobile-logo {
        width: 32px;
        height: 32px;
    }

    .mobile-logo span {
        font-size: 12px;
    }

    .username {
        font-size: 13px;
    }

    .role {
        font-size: 11px;
    }

    .content-header {
        padding: 16px 12px;
    }

    .content-body {
        padding: 16px 12px;
    }

    .mobile-layout .login-form {
        padding: 20px;
        margin-bottom: 12px;
    }
}