/* Premium Glassmorphism Design System */

:root {
    /* Color Palette - Vibrant Slate & Aurora Purple */
    --bg-dark: #09090b;
    --card-bg: rgba(20, 20, 25, 0.4);
    --card-border: rgba(255, 255, 255, 0.07);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    
    --primary-gradient: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
    --hover-gradient: linear-gradient(135deg, #c084fc 0%, #818cf8 100%);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-color: #6366f1;
    --success-color: #10b981;
    
    /* Font Stack */
    --font-header: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Aurora Deco */
.background-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
}

.circle-1 {
    top: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: #6366f1;
}

.circle-2 {
    bottom: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: #a78bfa;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(99, 102, 241, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Logo Design */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.logo-icon {
    font-size: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.logo-text {
    font-family: var(--font-header);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Headers */
h1 {
    font-family: var(--font-header);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 40px;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 0 6px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

/* Select element resetting */
.input-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.input-group select option {
    background-color: #121214;
    color: var(--text-primary);
}

.input-group label {
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group .bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

/* Floating Label Animation */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group select:focus ~ label,
.input-group select:valid ~ label {
    top: -16px;
    font-size: 12px;
    color: #a78bfa;
    font-weight: 500;
}

.input-group input:focus ~ .bar,
.input-group select:focus ~ .bar {
    width: 100%;
}

.input-group input:focus,
.input-group select:focus {
    border-bottom: 1px solid transparent;
}

/* Select Box Custom Arrow Indicator */
.select-group::after {
    content: "▼";
    font-size: 10px;
    color: var(--text-secondary);
    position: absolute;
    right: 4px;
    bottom: 12px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-group select:focus ~ ::after {
    transform: rotate(180deg);
}

/* Email Status Message Styling */
.email-status-msg {
    font-size: 12px;
    margin-top: -12px;
    margin-bottom: 4px;
    line-height: 1.4;
    transition: color 0.3s ease;
    color: var(--text-secondary);
}

.email-status-msg.success {
    color: #10b981; /* 초록색 - 기존 가입 확인 */
}

.email-status-msg.info {
    color: #a78bfa; /* 보라색 - 신규 등록 필요 */
}

.email-status-msg.error {
    color: #ef4444; /* 빨간색 - 형식 에러 */
}

/* Sliding Animation for Additional Fields */
.additional-fields {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0px;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), 
                opacity 0.3s ease, 
                gap 0.4s ease, 
                margin 0.4s ease;
}

.additional-fields.show {
    max-height: 350px;
    opacity: 1;
    gap: 28px;
    margin-top: 12px;
    margin-bottom: 8px;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease-in, 
                gap 0.4s ease, 
                margin 0.4s ease;
}

/* Button Submit */
.btn-submit {
    position: relative;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font-header);
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px var(--accent-glow);
    transition: all 0.3s ease;
    margin-top: 16px;
    overflow: hidden;
    width: 100%;
}

.btn-submit:hover {
    background: var(--hover-gradient);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* Dashboard Styles (Company Page) */
.dashboard-container {
    z-index: 10;
    width: 100%;
    max-width: 600px;
}

.dashboard-card {
    max-width: 100%;
}

.dashboard-card.master-card {
    max-width: 800px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
    align-self: center;
}

.status-badge.master-badge {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.25);
    color: #a78bfa;
}

.status-badge.master-badge .pulse-dot {
    background: #a78bfa;
    box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7);
    animation: pulse-master 1.6s infinite;
}

@keyframes pulse-master {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(167, 139, 250, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0);
    }
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
}

.company-highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.welcome-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 12px;
}

.welcome-message strong {
    color: var(--text-primary);
}

/* Request Form Styling (For company portal) */
.request-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 40px;
    width: 100%;
}

.form-group-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.field-label {
    font-family: var(--font-header);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    letter-spacing: -0.2px;
}

textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    resize: none;
    transition: all 0.3s ease;
}

textarea:focus {
    border-color: #a78bfa;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.15);
}

/* File Upload Field */
.file-upload-wrapper {
    width: 100%;
}

.file-input-hidden {
    display: none;
}

.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.file-drop-area:hover {
    border-color: #a78bfa;
    background: rgba(167, 139, 250, 0.03);
}

.upload-cloud-icon {
    font-size: 28px;
    margin-bottom: 12px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.file-select-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.file-drop-area:hover .file-select-btn {
    background: #6366f1;
    border-color: #6366f1;
}

.file-name-preview {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Alert Box */
.alert-success-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 28px;
    width: 100%;
}

.alert-icon {
    color: var(--success-color);
    font-weight: bold;
    font-size: 16px;
}

.alert-text {
    font-size: 14px;
    color: #e6fcf5;
    font-weight: 500;
}

/* Partners Table Styles (For master portal) */
.partners-section {
    margin-bottom: 40px;
    width: 100%;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
    width: 100%;
}

.section-title {
    font-family: var(--font-header);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.partner-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.partner-count strong {
    color: #a78bfa;
    font-weight: 600;
}

.table-container {
    max-height: 350px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar for table-container */
.table-container::-webkit-scrollbar {
    width: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.partners-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.partners-table th,
.partners-table td {
    padding: 14px 18px;
}

.partners-table th {
    background: rgba(255, 255, 255, 0.04);
    font-family: var(--font-header);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1;
}

.partners-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.partners-table tr:last-child td {
    border-bottom: none;
}

.partners-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.col-company {
    font-weight: 600;
    color: #a78bfa;
}

.col-task {
    color: #818cf8;
    font-weight: 500;
}

.col-date {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Partner Redirection Link in table */
.partner-link {
    font-weight: 600;
    color: #a78bfa;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.partner-link:hover {
    color: #c084fc;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.4);
    text-decoration: underline;
}

/* Dashboard Footer */
.dashboard-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: translateY(-2px);
}

.btn-exit-icon {
    width: 18px;
    height: 18px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .glass-card {
        padding: 32px 20px;
        border-radius: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
}
