/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   MAIN CONTENT CONTAINER
   ============================================ */
.container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 48px;
    max-width: 480px;
    width: 100%;
    margin: 40px auto;
}

/* Typography */
h1 {
    font-size: 48px;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(90deg, #0084ff 30%, #ff6600 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 70px rgba(255, 159, 64, 0.9);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: #86868b;
    font-size: 21px;
    margin-bottom: 40px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

/* Password Input */
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s;
    background: white;
}

.form-group input[type="password"]:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: #0071e3;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.input-with-icon input[type="password"] {
    padding-left: 42px;
}

/* File Input */
.file-input-wrapper {
    position: relative;
    display: block;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border: 2px dashed #d2d2d7;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.2s;
    cursor: pointer;
}

.file-input-display:hover {
    border-color: #0071e3;
    background: #f0f7ff;
}

.file-input-display.has-file {
    border-style: solid;
    border-color: #0071e3;
    background: #f0f7ff;
}

.file-name {
    color: #86868b;
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-input-display.has-file .file-name {
    color: #0071e3;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.file-icon svg {
    width: 18px;
    height: 18px;
    stroke: #0071e3;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   BUTTONS
   ============================================ */
.button-primary {
    width: 100%;
    padding: 16px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 32px;
    min-height: 56px;
    line-height: 1;
    position: relative;
}

.button-primary:hover:not(:disabled) {
    background: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.button-primary:active:not(:disabled) {
    transform: translateY(0);
}

.button-primary:disabled {
    background: #d2d2d7;
    cursor: not-allowed;
    transform: none;
}

.button-primary.is-loading {
    pointer-events: none;
}

.button-primary .btn-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
}

@keyframes btn-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.button-primary .btn-text {
    display: inline-block;
}

.button-primary.is-loading .btn-text {
    opacity: 0;
}

.button-primary.is-loading .btn-spinner {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
    text-align: center;
    margin-top: 32px;
    display: none;
}

.spinner {
    border: 3px solid #f5f5f7;
    border-top: 3px solid #0071e3;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #86868b;
    font-size: 15px;
}

/* ============================================
   RESULT DISPLAY
   ============================================ */
.result {
    margin-top: 32px;
    padding: 24px;
    border-radius: 12px;
    display: none;
    position: relative;
}

.result-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: #1d1d1f;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
}

.result-close:hover {
    background: rgba(0, 0, 0, 0.16);
}

.result.success {
    background: #e8f5e9;
    border: 1px solid #66bb6a;
}

.result.warning {
    background: #fff3e0;
    border: 1px solid #ffa726;
}

.result.error {
    background: #ffebee;
    border: 1px solid #ef5350;
}

.result h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.result.success h3 {
    color: #2e7d32;
}

.result.warning h3 {
    color: #f57c00;
}

.result.error h3 {
    color: #c62828;
}

/* Result Items */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 15px;
}

.result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-item:first-child {
    padding-top: 0;
}

.result-label {
    font-weight: 500;
    color: #1d1d1f;
    flex-shrink: 0;
    margin-right: 16px;
}

.result-value {
    text-align: right;
    color: #424245;
    word-break: break-word;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.status-valid {
    background: #66bb6a;
    color: white;
}

.status-revoked {
    background: #ef5350;
    color: white;
}

.status-expired {
    background: #ffa726;
    color: white;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */


@media (max-width: 600px) {
    .container {
        padding: 32px 24px;
        max-width: 90%;
		margin: 40px auto;
    }

    h1 {
        font-size: 40px;
    }

    .result-item {
        flex-direction: column;
        gap: 4px;
    }

    .result-value {
        text-align: left;
    }
}
