/* HDM Services Portal - Custom Styles */

/* General */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fa;
}

main {
    flex: 1;
}

/* ============================================
   LOGIN PAGE - PROFESSIONAL SPLIT DESIGN
   ============================================ */

.login-container {
    height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Brand Panel (Left Side) */
.login-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-brand-panel.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 480px;
}

.brand-logo-container {
    margin-bottom: 2.5rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.brand-logo-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 20px 40px rgba(59, 130, 246, 0.4));
}

.brand-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 1.125rem;
    color: #94a3b8;
    margin: 0 0 2rem 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.brand-decorative-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    margin: 0 auto;
    animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.5; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.2); }
}

/* Floating Background Shapes */
.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    animation: float-shape 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    right: -80px;
    animation-delay: 7s;
}

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.05; }
    33% { transform: translate(30px, -30px) scale(1.1); opacity: 0.1; }
    66% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.08; }
}

/* Form Panel (Right Side) */
.login-form-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.login-form-panel.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.form-content {
    width: 100%;
    max-width: 440px;
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.form-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Custom Form Elements */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label-custom {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.form-input-custom {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: #0f172a;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    outline: none;
}

.form-input-custom::placeholder {
    color: #94a3b8;
}

.form-input-custom:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input-custom:hover:not(:focus) {
    border-color: #cbd5e1;
}

/* Sign In Button */
.btn-signin {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: box-shadow 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-top: 2rem;
}

.btn-signin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-signin:hover::before {
    left: 100%;
}

.btn-signin:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-signin:active {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-signin.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-signin.loading .btn-arrow {
    animation: arrow-loading 1s infinite;
}

@keyframes arrow-loading {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-signin:hover .btn-arrow {
    transform: none;
}

/* Error Message */
.error-message {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-icon {
    flex-shrink: 0;
    color: #dc2626;
}

.error-text {
    font-size: 0.875rem;
    color: #991b1b;
    line-height: 1.5;
}

/* Form Footer */
.form-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.footer-text {
    font-size: 0.875rem;
    color: #94a3b8;
    text-align: center;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .login-form-panel {
        padding: 2rem 1.5rem;
    }

    .form-title {
        font-size: 1.875rem;
    }

    .brand-title {
        font-size: 2.5rem;
    }
}

/* Application Cards */
.app-card {
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    border: none;
}

.app-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

.app-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4f8;
    border-radius: 50%;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Cards */
.card {
    border-radius: 10px;
}

/* Buttons */
.btn {
    border-radius: 8px;
}

/* Table improvements */
.table thead {
    background-color: #f8f9fa;
}

/* Badge styles */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-container .col-md-5 {
        padding: 0 15px;
    }
}
