/* VNet Minimal 8.0 - Light / Dark Authentication */

/* 背景：浅色蓝粉渐变 */
#page-container:has(.v2board-auth-box) .v2board-background {
    background-image:
        radial-gradient(ellipse at 15% 75%, rgba(245,174,187,.23), transparent 42%),
        radial-gradient(ellipse at 85% 80%, rgba(126,169,239,.27), transparent 46%),
        linear-gradient(145deg,#ffffff,#f8faff 55%,#edf4ff) !important;
    background-color: #f8faff !important;
    background-size: cover !important;
}

/* 保持原始登录容器的尺寸与定位 */
#page-container:has(.v2board-auth-box) .v2board-auth-box {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* 只美化真正的表单卡片 */
.v2board-auth-box .block.block-rounded {
    background: #ffffff !important;
    border: 1px solid #e3eaf5 !important;
    border-radius: 20px !important;
    box-shadow: 0 22px 60px rgba(35,57,99,.12) !important;
    overflow: hidden;
}

.v2board-auth-box .bg-white,
.v2board-auth-box .block-content {
    background-color: #ffffff !important;
}

.v2board-auth-box .font-size-h1,
.v2board-auth-box .text-dark {
    color: #1c3154 !important;
}

.v2board-auth-box .text-muted {
    color: #708098 !important;
    line-height: 1.7 !important;
}

/* 输入框 */
.v2board-auth-box input.form-control {
    min-height: 46px !important;
    border-radius: 10px !important;
    border: 1px solid #e1e8f3 !important;
    background: #f7f9fd !important;
    color: #253650 !important;
    font-size: 14px !important;
}

.v2board-auth-box input.form-control:focus {
    background: #fff !important;
    border-color: #7296d9 !important;
    box-shadow: 0 0 0 3px rgba(65,111,198,.11) !important;
}

/* 登录、注册按钮 */
.v2board-auth-box .btn-primary,
.v2board-auth-box .ant-btn-primary {
    min-height: 44px !important;
    border-radius: 10px !important;
    background: #416fc6 !important;
    border-color: #416fc6 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.v2board-auth-box .bg-gray-lighter {
    background: #f8fafd !important;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    #page-container:has(.v2board-auth-box) .v2board-background {
        background-image:
            radial-gradient(ellipse at 50% 85%,rgba(27,86,157,.35),transparent 55%),
            linear-gradient(155deg,#090f19,#111c30 80%,#122845) !important;
        background-color: #0b1422 !important;
    }

    .v2board-auth-box .block.block-rounded {
        background: #192536 !important;
        border-color: #35475f !important;
        box-shadow: 0 20px 65px rgba(0,0,0,.38) !important;
    }

    .v2board-auth-box .bg-white,
    .v2board-auth-box .block-content {
        background: #192536 !important;
        color: #edf2fa !important;
    }

    .v2board-auth-box .font-size-h1,
    .v2board-auth-box .text-dark {
        color: #f1f5fc !important;
    }

    .v2board-auth-box .text-muted {
        color: #aab9cc !important;
    }

    .v2board-auth-box input.form-control {
        background: #101b2a !important;
        border-color: #344761 !important;
        color: #eaf1fb !important;
    }

    .v2board-auth-box input.form-control::placeholder {
        color: #95a5bd !important;
    }

    .v2board-auth-box .bg-gray-lighter {
        background: #202f43 !important;
    }

    .v2board-auth-box a {
        color: #9dbfff !important;
    }
}

/* 小屏幕 */
@media (max-width: 540px) {
    .v2board-auth-box .block.block-rounded {
        border-radius: 14px !important;
    }
}


/* VNET-AUTH-MOBILE-82-START */
@media (max-width: 767px) {

  /*
   * Only apply to standalone authentication pages.
   * Do not touch pages containing the V2Board sidebar.
   */

  body:not(:has(#sidebar)) {
    --vnet-auth-text: #e6eef8;
    --vnet-auth-muted: #b9c8da;
    --vnet-auth-border: #40516b;
  }

  /* Improve input placeholder readability */
  body:not(:has(#sidebar)) input::placeholder {
    color: #aabbd0 !important;
    opacity: 1 !important;
  }

  /* Keep native email suffix selectors consistent */
  body:not(:has(#sidebar)) select {
    background-color: #15243a !important;
    color: #e3ebf6 !important;
    border: 1px solid #405470 !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body:not(:has(#sidebar)) select option {
    color: #e3ebf6;
    background-color: #15243a;
  }

  /* Ant Design select compatibility */
  body:not(:has(#sidebar)) .ant-select-selector,
  body:not(:has(#sidebar)) .ant-select-selection {
    background-color: #15243a !important;
    border-color: #405470 !important;
    color: #e3ebf6 !important;
  }

  body:not(:has(#sidebar)) .ant-select-selection-selected-value,
  body:not(:has(#sidebar)) .ant-select-selection-item,
  body:not(:has(#sidebar)) .ant-select-arrow {
    color: #e3ebf6 !important;
  }

  /* Avoid overly bright borders on authentication cards */
  body:not(:has(#sidebar)) .ant-card {
    border-color: #40516b !important;
  }

  /* Bottom links and language labels */
  body:not(:has(#sidebar)) .ant-card a:not(.ant-btn),
  body:not(:has(#sidebar)) .ant-card .text-muted {
    color: #b9c8da !important;
  }

  /* Preserve main blue buttons */
  body:not(:has(#sidebar)) .ant-btn-primary {
    color: #fff !important;
  }
}
/* VNET-AUTH-MOBILE-82-END */




/* VNET-AUTH-MOBILE-84-START */
@media (max-width: 767px) {

  /* Native email suffix dropdown */
  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 15px 0 7px !important;
    background-color: #101b2e !important;
    color: #e6eef8 !important;
    border: 1px solid #354962 !important;
    border-radius: 0 12px 12px 0 !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    margin-left: -1px !important;
  }

  /* Email input beside suffix */
  body:not(:has(#sidebar))
  .v2board-auth-box
  input.form-control.form-control-alt:has(+ select.form-control.form-control-alt) {
    border-radius: 12px 0 0 12px !important;
    margin-right: 0 !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Focus */
  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt:focus {
    border-color: #648cd0 !important;
    outline: none !important;
  }

  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt option {
    background: #101b2e;
    color: #e6eef8;
  }
}
/* VNET-AUTH-MOBILE-84-END */


/* VNET-AUTH-DESKTOP-EMAIL-START */
@media (min-width: 768px) {

  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    margin: 0 0 0 -1px !important;
    padding: 0 15px 0 7px !important;
    border: 1px solid #dce5f2 !important;
    border-radius: 0 12px 12px 0 !important;
    background-color: #f3f6fb !important;
    color: #253650 !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
  }

  body:not(:has(#sidebar))
  .v2board-auth-box
  input.form-control.form-control-alt:has(+ select.form-control.form-control-alt) {
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    border-radius: 12px 0 0 12px !important;
    margin: 0 !important;
    vertical-align: middle !important;
  }

  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt:focus {
    border-color: #648cd0 !important;
    outline: none !important;
  }
}
/* VNET-AUTH-DESKTOP-EMAIL-END */





/* VNET-EMAIL-DUAL-MODE-START */
@media (max-width: 767px) {

  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt {
    -webkit-appearance: none !important;
    appearance: none !important;

    background-color: #f3f6fb !important;
    color: #253650 !important;
    border-color: #dce5f2 !important;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23253650' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;

    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 9px 6px !important;
  }
}

@media (max-width: 767px) and (prefers-color-scheme: dark) {

  body:not(:has(#sidebar))
  .v2board-auth-box
  select.form-control.form-control-alt {
    background-color: #101b2e !important;
    color: #e6eef8 !important;
    border-color: #354962 !important;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23E6EEF8' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  }
}
/* VNET-EMAIL-DUAL-MODE-END */
