/* ============================================================
   IMMOPLANER MANAGEMENT PORTAL - MAIN STYLESHEET
   Farbschema: Schwarz (#1a1a1a), Gold/Gelb (#ffd700)
   ============================================================ */

:root {
    /* Hauptfarben aus Logo */
    --primary-black: #1a1a1a;
    --primary-gold: #ffd700;
    --secondary-gray: #666666;
    --light-gray: #f5f5f5;
    --border-gray: #e0e0e0;
    
    /* Theme Light */
    --bg-main: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --sidebar-bg: #1a1a1a;
    --sidebar-text: #ffffff;
    --sidebar-hover: rgba(255, 215, 0, 0.1);
    
    /* Schatten & Abstände */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.16);
    --radius: 8px;
    --spacing: 20px;
}
/* SIDEBAR TOGGLE */
.ipk-sidebar-toggle {
    position: absolute;
    top: 20px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--ipk-primary) 0%, var(--ipk-accent) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

.ipk-sidebar-toggle:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(218, 165, 32, 0.5);
}

.chevron-icon {
    width: 16px;
    height: 16px;
    color: white;
    transition: transform 0.3s ease;
}

.ipk-sidebar.collapsed .chevron-icon {
    transform: rotate(180deg);
}


/* Dark Theme */
body.dark-theme {
    --bg-main: #1e1e1e;
    --bg-secondary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-gray: #404040;
    --light-gray: #2a2a2a;
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

input, select, textarea {
    font-family: inherit;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius);
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.ipk-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-black) 0%, #333333 100%);
    padding: 20px;
}

.ipk-login-container {
    background: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.ipk-login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.ipk-login-logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
}

.ipk-login-title {
    text-align: center;
    color: var(--primary-black);
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.ipk-login-subtitle {
    text-align: center;
    color: var(--secondary-gray);
    font-size: 14px;
    margin-bottom: 30px;
}

.ipk-form-group {
    margin-bottom: 20px;
}

.ipk-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-black);
    font-size: 14px;
}

.ipk-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.ipk-form-input:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.ipk-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, #ffed4e 100%);
    color: var(--primary-black);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.ipk-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.3);
}

.ipk-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ipk-alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.ipk-alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* ============================================================
   LAYOUT - SIDEBAR & MAIN
   ============================================================ */
.ipk-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.ipk-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: width 0.3s ease;
}

/* Sidebar Toggle Button */
.ipk-sidebar-toggle {
    position: absolute;
    top: 20px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.2s ease;
    font-size: 24px;
    padding: 0;
    outline: none;
}

.ipk-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.ipk-sidebar-toggle:active {
    background: rgba(255, 255, 255, 0.15);
}

.ipk-toggle-icon {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
}

/* Collapsed Sidebar */
.ipk-sidebar.collapsed {
    width: 80px;
}

.ipk-sidebar.collapsed .ipk-sidebar-header {
    padding: 25px 10px;
}

.ipk-sidebar.collapsed .ipk-sidebar-logo {
    max-width: 50px;
}

.ipk-sidebar.collapsed .ipk-sidebar-title {
    display: none;
}

.ipk-sidebar.collapsed .ipk-nav-text {
    display: none;
}

.ipk-sidebar.collapsed .ipk-nav-item {
    justify-content: center;
    padding: 14px 10px;
}

.ipk-sidebar.collapsed .ipk-nav-icon {
    margin-right: 0;
    font-size: 22px;
}

.ipk-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    transition: padding 0.3s ease;
}

.ipk-sidebar-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 12px;
    transition: max-width 0.3s ease;
}

.ipk-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    transition: opacity 0.3s ease;
}

.ipk-sidebar-title .ipk-highlight {
    color: var(--primary-gold);
}

.ipk-sidebar-nav {
    padding: 20px 0;
}

.ipk-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.ipk-nav-item:hover {
    background: var(--sidebar-hover);
    border-left-color: var(--primary-gold);
}

.ipk-nav-item.active {
    background: var(--sidebar-hover);
    border-left-color: var(--primary-gold);
}

.ipk-nav-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
}

.ipk-nav-text {
    font-size: 15px;
}

/* Main Content */
.ipk-main {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-main);
    transition: margin-left 0.3s ease;
}

/* Wenn Sidebar collapsed */
body.sidebar-collapsed .ipk-main {
    margin-left: 80px;
}

/* Header */
.ipk-header {
    background: var(--bg-main);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.ipk-header-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.ipk-header-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

.ipk-theme-toggle {
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ipk-theme-toggle:hover {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.ipk-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.ipk-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-black);
}

.ipk-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    display: none;
}

.ipk-user-dropdown.show {
    display: block;
}

.ipk-dropdown-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-gray);
    transition: all 0.3s ease;
}

.ipk-dropdown-item:last-child {
    border-bottom: none;
}

.ipk-dropdown-item:hover {
    background: var(--bg-secondary);
}

/* Content Area */
.ipk-content {
    padding: 30px;
}

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.ipk-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.ipk-dashboard-card {
    background: var(--bg-main);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.ipk-dashboard-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ipk-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-gold);
}

.ipk-card-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipk-card-icon {
    color: var(--primary-gold);
    font-size: 22px;
}

.ipk-card-body {
    color: var(--text-secondary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ipk-btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ipk-btn-gold {
    background: var(--primary-gold);
    color: var(--primary-black);
}

.ipk-btn-gold:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ipk-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
}

.ipk-btn-outline:hover {
    background: var(--primary-gold);
    color: var(--primary-black);
}
        .ipk-board-title-section h2 {
            font-size: 24px;
            margin-bottom: 5px;
        }
        
        .ipk-board-description {
            font-size: 14px;
            opacity: 0.9;
        }
        
        .ipk-board-container {
            display: flex;
            gap: 15px;
            overflow-x: auto;
            padding-bottom: 20px;
            min-height: 500px;
        }
        
        .ipk-list {
            background: var(--bg-secondary);
            border-radius: var(--radius);
            width: 300px;
            flex-shrink: 0;
            max-height: calc(100vh - 250px);
            display: flex;
            flex-direction: column;
        }
        
        .ipk-list-header {
            padding: 15px;
            border-bottom: 1px solid var(--border-gray);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .ipk-list-title {
            font-weight: 600;
            font-size: 16px;
        }
        
        .ipk-list-cards {
            padding: 10px;
            overflow-y: auto;
            flex: 1;
            min-height: 100px;
        }
        
        .ipk-card {
            background: var(--bg-main);
            border: 2px solid var(--border-gray);
            border-radius: var(--radius);
            padding: 12px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .ipk-card:hover {
            border-color: var(--primary-gold);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .ipk-card.dragging {
            opacity: 0.5;
        }
        
        .ipk-card-labels {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }
        
        .ipk-card-label {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 11px;
            color: white;
            font-weight: 500;
        }
        
        .ipk-card-title {
            font-weight: 500;
            margin-bottom: 8px;
            color: var(--text-primary);
        }
        
        .ipk-card-meta {
            display: flex;
            gap: 12px;
            font-size: 12px;
            color: var(--text-secondary);
        }
        
        .ipk-card-meta-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .ipk-list-footer {
            padding: 10px;
            border-top: 1px solid var(--border-gray);
        }
        
        .ipk-add-card-btn {
            width: 100%;
            padding: 8px;
            background: transparent;
            border: 2px dashed var(--border-gray);
            border-radius: var(--radius);
            cursor: pointer;
            color: var(--text-secondary);
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .ipk-add-card-btn:hover {
            border-color: var(--primary-gold);
            color: var(--primary-gold);
            background: var(--bg-main);
        }
        
        .ipk-add-list {
            background: rgba(0,0,0,0.1);
            border-radius: var(--radius);
            width: 300px;
            flex-shrink: 0;
            padding: 15px;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px dashed transparent;
        }
        
        .ipk-add-list:hover {
            background: rgba(0,0,0,0.15);
            border-color: var(--primary-gold);
        }
        
        .ipk-add-list-content {
            text-align: center;
            color: rgba(0,0,0,0.6);
            font-weight: 500;
        }
        
        .ipk-quick-add-card {
            display: none;
            padding: 10px;
            background: var(--bg-main);
            border-radius: var(--radius);
            margin-bottom: 10px;
        }
        
        .ipk-quick-add-card.active {
            display: block;
        }
        
        .ipk-quick-add-input {
            width: 100%;
            padding: 8px;
            border: 2px solid var(--border-gray);
            border-radius: var(--radius);
            margin-bottom: 8px;
        }
        
        .ipk-quick-add-actions {
            display: flex;
            gap: 8px;
        }
        
        /* Card Detail Modal */
        .ipk-card-detail-modal .ipk-modal-content {
            max-width: 700px;
        }
        
        .ipk-card-detail-body {
            padding: 25px;
        }
        
        .ipk-card-section {
            margin-bottom: 25px;
        }
        
        .ipk-card-section-title {
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }
        
        .ipk-label-select {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }
        
        .ipk-label-option {
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            color: white;
            font-size: 13px;
            border: 2px solid transparent;
            transition: all 0.2s;
        }
        
        .ipk-label-option:hover {
            opacity: 0.8;
        }
        
        .ipk-label-option.selected {
            border-color: white;
            box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
        }
        
        .ipk-user-select {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: 10px;
        }
        
        .ipk-user-option {
            padding: 10px;
            border: 2px solid var(--border-gray);
            border-radius: var(--radius);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .ipk-user-option:hover {
            border-color: var(--primary-gold);
        }
        
        .ipk-user-option.selected {
            background: var(--primary-gold);
            border-color: var(--primary-gold);
            color: var(--primary-black);
        }
        
        /* Modal Base Styles */
        .ipk-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 9999;
            align-items: center;
            justify-content: center;
        }
        
        .ipk-modal.show {
            display: flex !important;
        }
        
        .ipk-modal-content {
            background: var(--bg-main);
            border-radius: 12px;
            max-width: 500px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            animation: modalSlideIn 0.3s ease;
        }
        
        .ipk-card-detail-modal .ipk-modal-content {
            max-width: 700px;
        }
        
        @keyframes modalSlideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
        .ipk-modal-header {
            padding: 20px 25px;
            border-bottom: 1px solid var(--border-gray);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .ipk-modal-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .ipk-modal-close {
            font-size: 28px;
            color: var(--text-secondary);
            cursor: pointer;
            line-height: 1;
            transition: color 0.2s;
        }
        
        .ipk-modal-close:hover {
            color: var(--text-primary);
        }


/* ============================================================
   TABLES
   ============================================================ */
.ipk-table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-gray);
    margin-top: 20px;
}

.ipk-table {
    width: 100%;
    border-collapse: collapse;
}

.ipk-table thead {
    background: var(--light-gray);
}

.ipk-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-gold);
}

.ipk-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-gray);
}

.ipk-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .ipk-sidebar {
        transform: translateX(-100%);
    }
    
    .ipk-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .ipk-main {
        margin-left: 0;
    }
    
    .ipk-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.ipk-mt-20 { margin-top: 20px; }
.ipk-mb-20 { margin-bottom: 20px; }
.ipk-text-center { text-align: center; }
.ipk-text-gold { color: var(--primary-gold); }
.ipk-text-secondary { color: var(--text-secondary); }
.ipk-font-bold { font-weight: 600; }

/* ============================================================
   PROJEKTMANAGEMENT - KOMPAKTE IMMOBILIEN-KARTEN
   ============================================================ */

/* Kompakte Karten */
.ipk-card-compact {
    padding: 0;
}

.ipk-card-property-header {
    background: var(--bg-secondary);
    padding: 10px 12px;
    border-bottom: 2px solid var(--border-gray);
}

.ipk-card-property-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ipk-card-property-type {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.ipk-card-property-body {
    padding: 12px;
}

.ipk-card-property-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.ipk-card-property-stat {
    font-size: 11px;
    color: var(--text-secondary);
}

.ipk-card-property-stat-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

.ipk-card-photo-thumbnails {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.ipk-card-photo-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid var(--border-gray);
    cursor: pointer;
    transition: all 0.2s;
}

.ipk-card-photo-thumb:hover {
    border-color: var(--primary-gold);
    transform: scale(1.05);
}

.ipk-card-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ipk-card-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
}

.ipk-card-link-icon:hover {
    background: var(--primary-gold);
    transform: translateY(-2px);
}

.ipk-card-link-icon .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    margin-bottom: 4px;
    z-index: 1000;
}

.ipk-card-link-icon:hover .tooltip {
    opacity: 1;
}

.ipk-card-doc-count {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
