/* Microsoft Entra ID login page styling */

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

body, html {
    height: 100%;
}

.ms-body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

    background-image: url('/static/background.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: #1b1b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Container */
.ms-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* Main login box */
.ms-login-box {
    background: #ffffff;
    padding: 44px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

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

/* Logo */
.ms-logo {
    margin-bottom: 16px;
}

.ms-logo-img {
    height: 24px;
    width: auto;
}

/* Titles */
.ms-title {
    font-size: 24px;
    font-weight: 600;
    color: #1b1b1b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.ms-subtitle {
    font-size: 13px;
    color: #616161;
    margin-bottom: 24px;
}

/* Form */
.ms-form {
    width: 100%;
}

.ms-input-group {
    margin-bottom: 16px;
}

.ms-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 15px;
    font-family: inherit;
    border: none;
    border-bottom: 1px solid #767676;
    outline: none;
    background: transparent;
    color: #1b1b1b;
    transition: border-color 0.2s;
}

.ms-input:focus {
    border-bottom-color: #0067b8;
    border-bottom-width: 2px;
    padding-bottom: 5px;
}

.ms-input::placeholder {
    color: #767676;
}

/* Help text */
.ms-help-text {
    font-size: 13px;
    color: #616161;
    margin-bottom: 8px;
}

.ms-help-text a {
    color: #0067b8;
    text-decoration: none;
}

.ms-help-text a:hover {
    text-decoration: underline;
    color: #005a9e;
}

/* Buttons */
.ms-button-group {
    display: flex;
    justify-content: flex-end;
    margin-top: 32px;
}

.ms-button {
    padding: 8px 20px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    min-width: 108px;
    transition: background-color 0.1s;
}

.ms-button-primary {
    background-color: #0067b8;
    color: #ffffff;
}

.ms-button-primary:hover {
    background-color: #005a9e;
}

/* Footer */
.ms-footer {
    display: flex;
    gap: 16px;

    position: fixed;
    bottom: 0px;
    right: 10px;

    font-size: 12px;
    color: #000;
    line-height: 28px;
    z-index: 1000;
}

.ms-footer a {
    text-decoration: none;
    color: #000;
}

.ms-footer a:hover {
    text-decoration: underline;
    color: #000;
}

.ms-footer span {
    color: #000;
}


/* ========= Verification page ========= */

.ms-verify-box {
    text-align: center;
}

.ms-verify-box .ms-logo {
    display: flex;
    justify-content: center;
}

.ms-verify-box .ms-title {
    text-align: center;
    margin-bottom: 16px;
}

.ms-shield-icon {
    margin: 16px auto 12px;
}

/* Step-by-step instructions */
.ms-steps {
    text-align: left;
    margin-bottom: 24px;
}

.ms-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.ms-step-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0067b8;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.ms-step-text {
    font-size: 13px;
    color: #1b1b1b;
    line-height: 1.5;
}

.ms-emphasis {
    font-weight: 600;
}

.ms-key-hint {
    display: inline-block;
    font-family: 'Segoe UI', monospace;
    font-size: 11px;
    background: #f0f0f0;
    border: 1px solid #d1d1d1;
    border-radius: 3px;
    padding: 1px 5px;
    color: #444;
}

/* OR divider */
.ms-or-divider {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #d1d1d1;
    line-height: 0;
    margin: 18px 0;
}

.ms-or-divider span {
    background: #ffffff;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #767676;
    letter-spacing: 0.5px;
}

/* Verify input */
.ms-verify-input {
    text-align: left;
    font-size: 13px;
    padding: 10px 12px;
    border: 1px solid #d1d1d1;
    border-bottom: 1px solid #767676;
    background: #fafafa;
}

.ms-verify-input:focus {
    border: 1px solid #0067b8;
    border-bottom: 2px solid #0067b8;
    padding-bottom: 9px;
    background: #ffffff;
}

.ms-input-success {
    border-color: #107c10 !important;
    color: #107c10;
    background: #f0fff0;
}

/* Status indicator */
.ms-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #767676;
}

.ms-status-ok {
    color: #107c10;
    font-weight: 600;
}

.ms-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d1d1;
    border-top-color: #0067b8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Drop zone */
.ms-drop-zone {
    border: 2px dashed #c0c8d1;
    border-radius: 8px;
    padding: 20px 16px;
    margin: 0;
    text-align: center;
    color: #616161;
    font-size: 13px;
    transition: all 0.25s ease;
    cursor: pointer;
    background: #f9fbfd;
}

.ms-drop-zone:hover {
    border-color: #90a8c0;
    background: #f4f8fc;
}

.ms-drop-zone.drag-over {
    border-color: #0067b8;
    background: #e8f0fe;
    color: #0067b8;
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(0,103,184,0.12);
}

.ms-drop-zone.drop-success {
    border-color: #107c10;
    background: #eaf5ea;
    color: #107c10;
    animation: drop-flash 0.5s ease;
}

@keyframes drop-flash {
    0% { transform: scale(1.02); }
    30% { transform: scale(0.98); }
    60% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.ms-drop-zone-text {
    margin-bottom: 12px;
    line-height: 1.5;
}

.ms-fake-addressbar-inline {
    display: inline-flex;
    vertical-align: middle;
    background: #eef1f5;
    border-radius: 3px;
    padding: 1px 3px;
    margin: 0 2px;
}

.ms-drop-zone-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ms-fake-addressbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 20px;
    padding: 5px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ms-fake-addressbar-icon {
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 3px;
    background: #eef1f5;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,103,184,0.3); }
    50% { box-shadow: 0 0 0 5px rgba(0,103,184,0); }
}

.ms-fake-addressbar-url {
    font-family: 'Segoe UI', monospace;
    font-size: 11px;
    color: #999;
}

.ms-drag-arrow-container {
    margin: 4px 0 0;
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.ms-drop-success-check {
    animation: check-pop 0.4s ease;
}

@keyframes check-pop {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* Error message */
.ms-error {
    color: #a80000;
    font-size: 13px;
    margin-top: 12px;
    text-align: left;
    line-height: 1.4;
}

/* ========= Done page ========= */

.ms-success-icon {
    margin: 24px auto 16px;
    text-align: center;
}

.ms-done-description {
    font-size: 14px;
    color: #616161;
    text-align: center;
    line-height: 1.5;
    margin-top: 12px;
}
