/* ===== Aklan 简约登录组件样式 ===== */

/* 侧边栏登录框整体样式 - 简约版 */
.sidebar-section-login {
    margin-bottom: 10px;
    padding: 15px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.sidebar-section-login .sidebar-section-title {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.sidebar-section-login .sidebar-section-title a,
.sidebar-section-login .sidebar-section-title span {
    font-size: 15px;
    font-weight: bold;
    color: #374151;
    text-decoration: none;
}

/* 输入框容器样式 */
.sidebar-section-login .email,
.sidebar-section-login .password,
.sidebar-section-login .verify,
.sidebar-section-login .submit {
    margin-bottom: 16px;
    position: relative;
}

/* 输入框标签样式 */
.sidebar-section-login .email::before,
.sidebar-section-login .password::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    z-index: 10;
    pointer-events: none;
}

.sidebar-section-login .email::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
}

.sidebar-section-login .password::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
}

/* 输入框样式 - 增强版 */
.sidebar-section-login .sidebar_login_input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    color: #374151;
    line-height: 1.5;
}

.sidebar-section-login .sidebar_login_input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.sidebar-section-login .sidebar_login_input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sidebar-section-login .sidebar_login_input:hover:not(:focus) {
    border-color: #9ca3af;
    background-color: #ffffff;
}

/* 密码显示/隐藏按钮样式 */
.sidebar-section-login .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-section-login .password-toggle:hover {
    color: #374151;
}

.sidebar-section-login .password-toggle svg {
    width: 16px;
    height: 16px;
}

/* 错误消息样式 */
.sidebar-section-login .text-red-500 {
    color: #ef4444;
    font-size: 12px;
}

.sidebar-section-login .hidden {
    display: none;
}

/* ===== Aklan 简约滑块验证码样式 ===== */
.aklan-simple-slider-verify {
    width: 100%;
}

.aklan-slider-track {
    position: relative;
    height: 32px;
    background: #f8f9fa;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
}

.aklan-slider-handle {
    position: absolute;
    left: 1px;
    top: 1px;
    width: 30px;
    height: 30px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 10;
    box-sizing: border-box;
    border-radius: 3px;
    background: #4ef393;
    border: 1px solid #22c55e;
}

.aklan-slider-handle:active {
    cursor: grabbing;
}

/* 滑块图标样式 */
.aklan-slider-handle .aklan-slider-icon,
.aklan-slider-handle svg.aklan-slider-icon {
    width: 14px;
    height: 14px;
    color: #1e293b;
    stroke: currentColor;
    stroke-width: 2;
}

.aklan-slider-success {
    text-align: center;
    height: 30px;
    border-radius: 4px;
    box-sizing: border-box;
    background: #dcfce7;
    line-height: 30px;
    font-size: 13px;
    color: #166534;
    border: 1px solid #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
}

/* 滑块背景条样式 */
.aklan-slider-bg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    background: linear-gradient(to right, #9feed4 0%, #f8f9fa 0%);
}

/* 登录按钮样式 - 简约 */
.sidebar-section-login .aklanSidebarLoginBtn {
    width: 100%;
    padding: 8px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.sidebar-section-login .aklanSidebarLoginBtn:hover {
    background: #2563eb;
}

.sidebar-section-login .aklanSidebarLoginBtn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* 注册链接样式 - 简约 */
.sidebar-section-login .register a {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    color: #3b82f6;
}

.sidebar-section-login .register a:hover {
    text-decoration: underline;
}

/* 已登录状态样式 - 简约 */
.aklan-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.aklan-user-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.aklan-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aklan-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aklan-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.aklan-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aklan-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
}

.aklan-user-email {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
}

.aklan-user-right {
    display: flex;
    align-items: center;
}

.aklan-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s;
}

.aklan-logout-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.aklan-logout-icon {
    width: 18px;
    height: 18px;
}

/* ===== 登录框在侧边栏内粘顶效果 ===== */

/* 在中大屏幕下，登录框在侧边栏内部粘顶 */
@media (min-width: 769px) {
    .sidebar-section-login {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #ffffff;
        margin-bottom: 10px;
        /* 添加阴影增强视觉层次 */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    /* 当侧边栏滚动时，登录框保持粘顶 */
    .sidebar-area {
        /* 确保侧边栏有滚动容器 */
        overflow-y: auto;
    }
}

/* 响应式调整 */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar-section-login {
        top: 0;
    }
}

/* 大屏幕调整 */
@media (min-width: 1025px) {
    .sidebar-section-login {
        top: 0;
    }
}

/* 小屏幕下不应用粘顶效果（侧边栏在上方） */
@media (max-width: 768px) {
    .sidebar-section-login {
        position: static; /* 恢复静态定位 */
    }
    
    /* 在小屏幕下，侧边栏在上方，登录框不需要粘顶 */
    .sidebar-area .sidebar-section-login {
        display: block !important; /* 确保显示 */
    }
}
