/**
 * PayPay証券 会社システム モダンデザイン共通CSS
 * ログイン、パスワード再設定などのシステム画面で使用
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    background-color: #f5f5f7;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ========================================
   Container Layout
   ======================================== */

.company-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================
   Header
   ======================================== */

.company-header {
    background: white;
    padding: 6px 24px;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.company-header img {
    max-height: 38px;
    width: auto;
    max-width: 200px;
}

.company-header-btn {
    background: #007aff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.company-header-btn:hover {
    background: #0051d5;
}

.company-header-btn.secondary {
    background: transparent;
    color: #007aff;
}

.company-header-btn.secondary::before {
    content: "ⓘ";
    margin-right: 4px;
    font-weight: bold;
}

.company-header-btn.secondary:hover {
    background: #f0f7ff;
}

/* ========================================
   Body
   ======================================== */

.company-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    max-width: 800px;
    min-height: 708px;
    border-radius: 8px;
    opacity: 1;
    margin: 0 auto;
}

.company-form-wrapper {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
    padding: 32px 24px;
}

.company-form-wrapper.wide {
    max-width: 720px;
}

/* ========================================
   Form Elements
   ======================================== */

.form-center-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    text-align: center;
}

.form-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.inline {
    display: flex;
    gap: 12px;
}

.form-group.inline > * {
    flex: 1;
}

/* ========================================
   Text Input Field Components
   ======================================== */

/* Text Input Group Container */
.text-input-group {
    width: 327px;
    opacity: 1;
}

/* Label with Counter */
.text-input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 12px 0;
    height: 20px;
}

.text-input-title {
    font-size: 13px;
    color: #000;
    font-weight: 500;
    line-height: 20px;
}

.text-input-counter {
    font-size: 12px;
    color: #BABABA;
    line-height: 20px;
}

/* Text Input Field */
/* Default state */
.text-input {
    width: 100%;
    max-width: 327px;
    height: 48px;
    padding: 2px 0;
    border: none;
    border-bottom: 1px solid #BABABA;
    border-radius: 0;
    font-size: 16px;
    line-height: 24px;
    transition: all 0.2s;
    background: transparent;
    color: #000;
    opacity: 1;
    box-sizing: border-box;
}

/* Hovered state - No specific style in design */

/* Focused/Active state */
.text-input:focus {
    outline: none;
    border-bottom: 2px solid #3895FF;
    background: transparent;
    height: 48px;
    padding: 12px 0;
    box-sizing: border-box;
}

/* Filled state */
.text-input.filled {
    border-bottom: 1px solid #BABABA;
    background: transparent;
}

/* Disabled state */
.text-input:disabled {
    background: transparent;
    color: #BABABA;
    border-bottom: 1px solid #BABABA;
    cursor: not-allowed;
}

/* Error state */
.text-input.error {
    border-bottom: 1px solid #FF3B30;
    background: transparent;
}

.text-input::placeholder {
    color: #BABABA;
}

/* Error Message */
.text-input-error {
    color: #FF3B30;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.text-input-error.show {
    display: block;
}


.form-note {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ========================================
   Buttons
   ======================================== */

/* Button Styles - Filled */
.btn-filled {
    width: 327px;
    height: 48px;
    padding: 12px 16px;
    background: #3895FF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 6px;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    opacity: 1;
}

.btn-filled:hover,
.btn-filled:active {
    background: #71B3FF;
}

.btn-filled:focus {
    background: #3895FF;
}

.btn-filled:disabled {
    background: #3895FF;
}

/* Button Styles - Border */
.btn-border {
    width: 327px;
    height: 48px;
    padding: 12px 16px;
    background: white;
    color: #3895FF;
    border: 1px solid #3895FF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 6px;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    opacity: 1;
}

.btn-border:hover,
.btn-border:active {
    background: white;
    border-color: #71B3FF;
}

.btn-border:focus {
    background: white;
    border: 2px solid #265EC5;
    outline: none;
}

.btn-border:disabled {
    background: white;
    color: #999;
    border: 1px solid #BABABA;
    cursor: not-allowed;
}

.btn-border.hide {
    display: none;
}

.btn-border-red {
    width: 600px;
    height: 48px;
    padding: 12px 16px;
    background: white;
    color: #FF3B30;
    border: 1px solid #FF3B30;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 6px;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    opacity: 1;
}

.btn-border-red:hover,
.btn-border-red:active {
    background: white;
    border-color: #FF6B66;
}

.btn-border-red:focus {
    background: white;
    border: 2px solid #CC2E24;
    outline: none;
}

.btn-border-red:disabled {
    background: white;
    color: #999;
    border: 1px solid #BABABA;
    cursor: not-allowed;
}

.btn-border-red.hide {
    display: none;
}

/* Button Styles - Ghost */
.btn-ghost {
    width: 327px;
    height: 48px;
    padding: 12px 16px;
    background: transparent;
    color: #007aff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 6px;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    opacity: 1;
}

.btn-ghost:hover,
.btn-ghost:active {
    background: transparent;
}

.btn-ghost:focus {
    width: 327px;
    height: 48px;
    padding: 12px 16px;
    background: transparent;
    border: 2px solid #265EC5;
    border-radius: 8px;
    opacity: 1;
    outline: none;
}

.btn-ghost:disabled {
    background: transparent;
    color: #999;
    cursor: not-allowed;
}

/* ========================================
   Link Styles
   ======================================== */

/* Link - Default */
.link,
a.link {
    font-family: "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    text-align: center;
    color: #3895FF;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.link:hover,
a.link:hover {
    color: #71B3FF;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
}

.link:focus,
a.link:focus {
    outline: 2px solid #3895FF;
    outline-offset: 2px;
    border-radius: 4px;
}

.link:disabled,
.link.disabled,
a.link:disabled,
a.link.disabled {
    color: #BABABA;
    cursor: not-allowed;
    pointer-events: none;
}

/* Link - With Arrow */
.link-arrow,
a.link-arrow {
    font-family: "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    letter-spacing: 0%;
    text-align: center;
    color: #3895FF;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.link-arrow::after,
a.link-arrow::after {
    font-weight: bold;
}

.link-arrow:hover,
a.link-arrow:hover {
    color: #71B3FF;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
}

.link-arrow:focus,
a.link-arrow:focus {
    color: #71B3FF;
    outline: 2px solid #3895FF;
    outline-offset: 2px;
    border-radius: 4px;
}

.link-arrow:disabled,
.link-arrow.disabled,
a.link-arrow:disabled,
a.link-arrow.disabled {
    color: #BABABA;
    cursor: not-allowed;
    pointer-events: none;
}

/* Link - Black */
.link-black,
a.link-black {
    font-family: "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    text-align: center;
    color: #242323;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.link-black:hover,
a.link-black:hover {
    color: #909090;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
}

.link-black:focus,
a.link-black:focus {
    outline: 2px solid #3895FF;
    outline-offset: 2px;
    border-radius: 4px;
}

.link-black:disabled,
.link-black.disabled,
a.link-black:disabled,
a.link-black.disabled {
    color: #BABABA;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   Info Sections
   ======================================== */

.error-box {
    background: #FFF3F3;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 8px;
    display: none;
    width: 100%;
    max-width: 327px;
}

.error-box.show {
    display: block;
}

.error-box-message {
    color: #FF3B30;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.error-box-message::before {
    content: "⚠";
    margin-right: 8px;
    font-size: 18px;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    display: none;
}

.info-box.show {
    display: block;
}

.info-box-title {
    font-size: 14px;
    color: #000;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.info-box-title::before {
    content: "ⓘ";
    display: inline-block;
    margin-right: 6px;
    font-weight: bold;
    color: #1976d2;
}

.info-box-link {
    color: #1976d2;
    font-size: 13px;
    text-decoration: none;
    padding-left: 10px;
    display: inline-block;
}

.info-box-link:hover {
    text-decoration: underline;
}

.info-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e7;
}

.info-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-text-center {
    text-align: center;
    color: #9e9e9e;
    font-size: 12px;
    line-height: 1.6;
    margin-top: 16px;
}

/* ========================================
   Help Section
   ======================================== */

.help-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e7;
    width: 100%;
    max-width: 327px;
}

.help-section.no-border {
    border-top: none;
    text-align: left;
}

.help-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.help-title::before {
    content: "?";
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #666;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    margin-right: 6px;
}

.help-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-link {
    color: #007aff;
    text-decoration: none;
    font-size: 14px;
}

.help-link:hover {
    text-decoration: underline;
}

/* ========================================
   Footer
   ======================================== */

.company-footer {
    background: white;
    border-top: 1px solid #e5e5e7;
    padding: 24px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-link {
    color: #007aff;
    text-decoration: none;
    font-size: 13px;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-info {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-copyright {
    font-size: 11px;
    color: #999;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (min-width: 769px) {
    body {
        background-color: #e8e8ed;
    }
}

@media (max-width: 768px) {
    body {
        background: white;
    }

    .company-header {
        padding: 16px;
    }

    .company-body {
        padding: 24px 16px;
    }

    .company-form-wrapper {
        border-radius: 0;
        box-shadow: none;
    }
}

/* ========================================
   Modal Dialog
   ======================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    overflow-y: auto;
}

.modal-dialog {
    background: white !important;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 420px;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    animation: slideUp 0.3s ease-out;
    overflow-y: auto;
    border: none !important;
    outline: none !important;
    opacity: 1;
    margin: auto;
}

/* PC (Desktop) styles */
@media (min-width: 769px) {
    .modal-overlay.show {
        align-items: center !important;
        justify-content: center !important;
    }

    .modal-dialog {
        margin: 0;
    }
}

/* Mobile (Smartphone) styles */
@media (max-width: 768px) {
    .modal-overlay.show {
        align-items: center !important;
        padding: 20px !important;
    }

    .modal-dialog {
        width: 90%;
        max-width: 390px;
        height: auto;
        max-height: calc(100vh - 40px);
        padding: 16px;
        gap: 10px;
        margin: auto;
    }
}

.modal-content {
    padding: 24px 24px 24px;
    text-align: center;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border-radius: 0 !important;
    outline: none !important;
}

.modal-message {
    font-size: 15px;
    color: #000;
    line-height: 1.5;
    margin-bottom: 4px;
    font-weight: bold;
}

.modal-submessage {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.modal-footer-actions {
    padding: 16px;
    text-align: center;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Passkey Promotion Styles */
.passkey-promo-title {
    font-size: 18px;
    font-weight: bold;
    color: #212121;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 12px;
}

.passkey-promo-description {
    font-size: 18px;
    color: #424242;
    text-align: center;
    line-height: 1.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

/* ========================================
   Passkey Registration Screens
   ======================================== */

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
    width: 100%;
    min-height: 80px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 200px;
    min-height: 50px;
}

.step-number {
    min-width: 80px;
    height: 30px;
    padding: 0 16px;
    border-radius: 24px;
    background: #e5e5e7;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    width: auto;
    white-space: nowrap;
    font-style: italic;
    transform: skewX(-10deg);
}

.step-item.active {
    width: 240px;
}

.step-item.active .step-number {
    background: #007aff;
    color: white;
}

.step-item.completed .step-number {
    background: #e5e5e7;
    color: #999;
}

.step-label {
    font-size: 12px;
    color: #666;
    width: 100%;
    text-align: center;
    line-height: 1.4;
}

.step-item.active .step-label {
    color: #007aff;
    font-weight: 600;
}

/* Password Input Controls */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Eye icon - open state */
.password-toggle::before {
    content: '';
    width: 20px;
    height: 12px;
    border: 2px solid #666;
    border-radius: 50%;
    position: relative;
    display: block;
}

.password-toggle::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.password-toggle:hover::before,
.password-toggle:hover::after {
    border-color: #3895FF;
    background: #3895FF;
}

/* Eye icon - closed state (when password is visible) */
.password-toggle.visible::before {
    border-color: #666;
    opacity: 0.5;
}

.password-toggle.visible::after {
    width: 24px;
    height: 2px;
    background: #666;
    border-radius: 0;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Illustration and Icon Boxes */
.illustration-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
    background: #f5f5f7;
    border: 2px dashed #d1d1d6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #f5f5f7;
    border: 2px dashed #d1d1d6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

/* Status Messages */
.status-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-bottom: 16px;
}

.status-description {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 32px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-bottom: 12px;
}

.email-info {
    font-size: 14px;
    color: #007aff;
    text-align: center;
    margin-bottom: 16px;
}

.instruction-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 16px;
}

.code-example {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 2px;
}

/* Help Box */
.help-box {
    background: #f5f5f7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.help-box-title {
    font-size: 14px;
    color: #000;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.help-box-title::before {
    content: "●";
    margin-right: 6px;
    color: #666;
}

.help-box-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.help-box-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.help-box-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Success States */
.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #34c759;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-icon::before {
    content: "✓";
    font-size: 48px;
    color: white;
    font-weight: bold;
}

.success-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-bottom: 8px;
}

.success-message {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 32px;
}

