/* ====================================================================
   CEO-VW ENTERPRISE UI (Conflict-Free, Responsive, Accessible)
==================================================================== */

#ceovw-corporate-app {
    all: initial; /* Strips theme inheritance */
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
    width: 100%;
    color: #1f2937;
}

#ceovw-corporate-app * {
    box-sizing: border-box;
}

#ceovw-corporate-app .ceovw-app-card {
    width: 100%;
    max-width: 28rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    position: relative;
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

#ceovw-corporate-app .ceovw-app-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.35rem;
    background: linear-gradient(90deg, var(--ceovw-brand, #2563eb), #6366f1);
}

/* Typography */
#ceovw-corporate-app .ceovw-header { 
    text-align: center; 
    margin-bottom: 2rem; 
}
#ceovw-corporate-app .ceovw-header h2 { font-size: 1.75rem; font-weight: 700; color: #111827; margin: 0 0 0.5rem; line-height: 1.2; }
#ceovw-corporate-app .ceovw-header p { font-size: 0.875rem; color: #6b7280; margin: 0; }

/* Fields */
#ceovw-corporate-app .ceovw-field-row { display: flex; gap: 1rem; }
#ceovw-corporate-app .ceovw-field-row .ceovw-field-group { flex: 1; }
#ceovw-corporate-app .ceovw-field-group { margin-bottom: 1.25rem; text-align: left; }
#ceovw-corporate-app label { display: block; font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 0.5rem; }
#ceovw-corporate-app input[type="text"],
#ceovw-corporate-app input[type="email"],
#ceovw-corporate-app input[type="password"] {
    width: 100%; padding: 0.75rem 1rem; font-size: 0.95rem; font-family: inherit;
    border: 1px solid #d1d5db; border-radius: 0.5rem; background: #f9fafb;
    transition: all 0.2s ease; outline: none; color: #111827;
}
#ceovw-corporate-app input:focus { border-color: var(--ceovw-brand); background: #ffffff; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }

/* Links & Actions */
#ceovw-corporate-app .ceovw-actions-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; font-size: 0.875rem; }
#ceovw-corporate-app .ceovw-link { color: var(--ceovw-brand); font-weight: 600; text-decoration: none; cursor: pointer; transition: color 0.2s; }
#ceovw-corporate-app .ceovw-link:hover { color: #1d4ed8; text-decoration: underline; }
#ceovw-corporate-app .ceovw-checkbox { display: flex; align-items: center; cursor: pointer; font-size: 0.875rem; color: #4b5563; }
#ceovw-corporate-app .ceovw-checkbox input { margin-right: 0.5rem; cursor: pointer; }

/* Buttons & Loaders */
#ceovw-corporate-app .ceovw-btn {
    width: 100%; padding: 0.875rem; font-size: 1rem; font-weight: 600; font-family: inherit;
    border: none; border-radius: 0.5rem; cursor: pointer; transition: all 0.2s;
    display: flex; justify-content: center; align-items: center; position: relative;
}
#ceovw-corporate-app .ceovw-btn-primary { background: var(--ceovw-brand); color: #ffffff; box-shadow: 0 4px 6px -1px rgba(37,99,235,0.2); }
#ceovw-corporate-app .ceovw-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
#ceovw-corporate-app .ceovw-btn.loading .btn-text { visibility: hidden; }
#ceovw-corporate-app .btn-loader {
    display: none; position: absolute; width: 1.25rem; height: 1.25rem;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #ffffff;
    border-radius: 50%; animation: ceovw-spin 0.8s linear infinite;
}
#ceovw-corporate-app .ceovw-btn.loading .btn-loader { display: block; }
@keyframes ceovw-spin { to { transform: rotate(360deg); } }

/* Footer Nav */
#ceovw-corporate-app .ceovw-footer-nav { text-align: center; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; font-size: 0.875rem; color: #6b7280; }

/* OTP Modal */
#ceovw-corporate-app .ceovw-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.7); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 99999;
}
#ceovw-corporate-app .ceovw-modal-content {
    background: #fff; padding: 2.5rem; border-radius: 1rem; width: 100%; max-width: 24rem;
    position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); text-align: center;
    animation: ceovw-slide-up 0.3s ease-out;
}
@keyframes ceovw-slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
#ceovw-corporate-app .ceovw-modal-close {
    position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: #9ca3af; transition: color 0.2s;
}
#ceovw-corporate-app .ceovw-modal-close:hover { color: #111827; }
#ceovw-corporate-app .ceovw-otp-inputs { display: flex; justify-content: center; gap: 0.5rem; margin: 2rem 0; }
#ceovw-corporate-app .ceovw-otp-box {
    width: 3rem !important; height: 3.5rem !important; text-align: center; font-size: 1.5rem !important;
    font-weight: 700; border: 2px solid #e5e7eb !important; border-radius: 0.5rem !important; padding: 0 !important;
}
#ceovw-corporate-app .ceovw-otp-box:focus { border-color: var(--ceovw-brand) !important; }
#ceovw-corporate-app .ceovw-error-msg { color: #dc2626; font-size: 0.875rem; margin-bottom: 1rem; height: 1.25rem; }
#ceovw-corporate-app .ceovw-resend-wrapper { margin-top: 1.5rem; font-size: 0.875rem; color: #6b7280; }
#ceovw-corporate-app #ceovw-btn-resend:disabled { color: #9ca3af; cursor: not-allowed; text-decoration: none; }

/* Responsive */
@media (max-width: 480px) {
    #ceovw-corporate-app .ceovw-app-card { padding: 2rem 1.5rem; }
    #ceovw-corporate-app .ceovw-field-row { flex-direction: column; gap: 0; }
    #ceovw-corporate-app .ceovw-otp-box { width: 2.5rem !important; height: 3rem !important; font-size: 1.25rem !important; }
}