/* ============================================
   Global Styles
   ============================================ */

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

html,
body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Helvetica, sans-serif;
    background-color: #FAFAFA;
    color: #1a1a1a;
    line-height: 1.6;
}

a {
    color: #E74A98;
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   Back Arrow
   ============================================ */

.back-arrow {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: white;
    border: 1px solid #e0e0e0;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    z-index: 10;
}

.back-arrow:hover {
    background-color: #f8f9fa;
    color: #1a1a1a;
    border-color: #d0d0d0;
    text-decoration: none;
}

.back-arrow svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Split Screen Container
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #FAFAFA;
    gap: 16px;
}

.split-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    min-height: 600px;
    background: white;
    border: 1px solid #E3E3E6;
    border-radius: 24px;
    overflow: hidden;
    margin: 0 auto;
}

/* ============================================
   Left Side - Auth Content
   ============================================ */

.auth-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    padding: 60px 80px;
    padding-top: 120px;
    overflow-y: auto;
}

.auth-content {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: left;
    margin-bottom: 32px;
}


.auth-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #4A4A50;
    font-weight: 400;
    line-height: 1.5;
}

/* ============================================
   Right Side - Dotted Background
   ============================================ */

.visual-side {
    flex: 1;
    background-color: #FAFAFA;
    background-image: radial-gradient(circle, #D1D1D6 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.visual-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* ============================================
   Form Styles
   ============================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #2F80ED;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.form-input.has-icon {
    padding-right: 44px;
}

.form-input.error {
    border-color: #e53e3e;
    background-color: #fff5f5;
}

.form-input.error:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

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

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon:hover {
    color: #1a1a1a;
}

/* ============================================
   Button Styles
   ============================================ */

.btn {
    height: 40px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 400;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-primary {
    background-color: #1a1a1a;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #333;
}

.btn-primary:active:not(:disabled) {
    background-color: #1a1a1a;
}

.btn-google {
    background-color: white;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    font-weight: 500;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #d0d0d0;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   Divider
   ============================================ */

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #999;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

/* ============================================
   Messages
   ============================================ */

.message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.message-error {
    background-color: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.message-success {
    background-color: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.message-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

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

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.auth-footer-text {
    font-size: 14px;
    color: #666;
}

.auth-footer-link {
    color: #E74A98;
    font-weight: 500;
}

.terms-text {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

.terms-text a {
    color: #666;
    text-decoration: underline;
}

.auth-copyright {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 24px;
    padding: 16px 0;
}

/* ============================================
   Dashboard Styles
   ============================================ */

.dashboard-container {
    min-height: 100vh;
    background-color: #FAFAFA;
}

.dashboard-header {
    background-color: white;
    border-bottom: 1px solid #E3E3E6;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-logo {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.dashboard-nav a {
    color: #666;
    font-size: 15px;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.dashboard-nav a:hover {
    background-color: #f0f0f0;
    color: #1a1a1a;
    text-decoration: none;
}

.dashboard-nav a.active {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.dashboard-welcome {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #E3E3E6;
    margin-bottom: 24px;
}

.dashboard-welcome h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.dashboard-welcome p {
    font-size: 16px;
    color: #666;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.dashboard-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #E3E3E6;
    transition: all 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dashboard-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.dashboard-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ============================================
   Profile Styles
   ============================================ */

.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #E3E3E6;
}

.profile-card h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-value {
    font-size: 16px;
    color: #1a1a1a;
    word-break: break-all;
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2F80ED;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@media (max-width: 1024px) {
    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .visual-side {
        min-height: 300px;
    }

    .auth-side {
        padding: 40px 32px;
        padding-top: 100px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 40px 20px;
        min-height: 100vh;
    }

    .split-container {
        border-radius: 16px;
        border: 1px solid #E3E3E6;
        min-height: auto;
    }

    .visual-side {
        display: none;
    }

    .auth-side {
        padding: 48px 32px;
        padding-top: 80px;
    }

    .back-arrow {
        top: 16px;
        left: 16px;
        width: 36px;
        height: 36px;
    }

    .back-arrow svg {
        width: 18px;
        height: 18px;
    }

    .dashboard-content {
        padding: 24px 16px;
    }

    .dashboard-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-welcome {
        padding: 24px;
    }

    .dashboard-welcome h1 {
        font-size: 24px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 24px;
    }
}



/* ============================================
   Dashboard Layout (für Contract Builder)
   ============================================ */

.dashboard {
    display: flex;
    width: 100%;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}



/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #FFFFFF;
    border-right: 1px solid #E4E4E7;
    padding: 24px 16px;
    overflow-y: auto;
}

.sidebar nav {
    position: relative;
}

.nav-background {
    position: absolute;
    background: linear-gradient(90deg, rgba(47,128,237,0.08) 0%, rgba(47,128,237,0.04) 100%);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 1;
    font-size: 15px;
    color: #52525B;
}

.nav-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.nav-item.active {
    color: #2F80ED;
    font-weight: 500;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}



/* Top Bar / Header */
.top-bar {
    height: 64px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E4E4E7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    height: 32px;
    width: auto;
}

.header-divider {
    color: #D1D5DB;
    font-size: 20px;
}

.header-divider-line {
    width: 1px;
    height: 24px;
    background-color: #E4E4E7;
}

.help-link {
    font-size: 14px;
    color: #52525B;
    cursor: pointer;
    transition: color 0.2s;
}

.help-link:hover {
    color: #1A1A1A;
}

