/* =========================================================
   I Ging Core
   Gemeinsames Core-Stylesheet
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    color: #222;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   Core Header
   --------------------------------------------------------- */

.core-header {
    background: #222;
    color: #fff;
    padding: 20px 30px;
}

.core-header-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.core-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: normal;
}

.core-header .version {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.75;
}

.core-user {
    margin-top: 12px;
    font-size: 14px;
}


/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.core-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.core-container-wide {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}
/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

.core-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.core-card h2 {
    margin-top: 0;
}


/* ---------------------------------------------------------
   Module list
   --------------------------------------------------------- */

.core-modules {
    display: grid;
    gap: 15px;
}

.core-module {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 20px;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.core-module-info {
    display: flex;
    flex-direction: column;
}

.core-module-name {
    font-weight: bold;
}

.core-module-version {
    font-size: 13px;
    color: #777;
    margin-top: 3px;
}


/* ---------------------------------------------------------
   Buttons / Links
   --------------------------------------------------------- */

.core-button {
    display: inline-block;

    padding: 8px 14px;

    background: #333;
    color: #fff;

    text-decoration: none;

    border-radius: 5px;

    font-size: 14px;
}

.core-button:hover {
    background: #555;
}

.core-link {
    color: #333;
    text-decoration: none;
}

.core-link:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */

.core-form {
    max-width: 420px;
}

.core-form-group {
    margin-bottom: 18px;
}

.core-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.core-form input[type="text"],
.core-form input[type="password"],
.core-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;

    border: 1px solid #ccc;
    border-radius: 5px;

    font: inherit;
}

.core-form input:focus {
    outline: none;
    border-color: #777;
}


.core-form textarea {
    width: 100%;
    padding: 10px 12px;

    border: 1px solid #ccc;
    border-radius: 5px;

    font: inherit;
    line-height: 1.5;

    resize: vertical;
}

.core-form textarea:focus {
    outline: none;
    border-color: #777;
}




/* ---------------------------------------------------------
   Messages
   --------------------------------------------------------- */

.core-message {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.core-message-error {
    background: #f8e5e5;
    color: #8a2222;
}

.core-message-success {
    background: #e5f3e8;
    color: #246b35;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.core-footer {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;

    text-align: center;

    font-size: 13px;
    color: #777;
}




/* =========================================================
   AUTORENWERKSTATT / TEXT WORKSPACE
   ========================================================= */

.core-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.core-muted {
    margin: 4px 0 0;
    color: #777;
    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   HORIZONTALE NAVIGATION
   --------------------------------------------------------- */

.core-toolbar {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.core-toolbar-link {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    background: #f2f2f2;
}

.core-toolbar-link:hover {
    background: #e8e8e8;
}


/* ---------------------------------------------------------
   ARBEITSBEREICH
   --------------------------------------------------------- */

.core-workspace {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
    gap: 20px;
    align-items: stretch;
}

.core-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.core-panel-text {
    min-width: 0;
}

.core-panel-workshop {
    min-width: 0;
}

.core-panel-header {
    margin-bottom: 20px;
}

.core-panel-header h2 {
    margin: 0;
}


/* ---------------------------------------------------------
   FORMULARE
   --------------------------------------------------------- */

.core-input,
.core-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.core-input:focus,
.core-textarea:focus {
    outline: none;
    border-color: #888;
}

.core-textarea {
    resize: vertical;
    min-height: 180px;
}

.core-textarea-large {
    min-height: 600px;
    line-height: 1.65;
}

.core-form-group {
    margin-bottom: 22px;
}

.core-form-group-grow {
    display: flex;
    flex-direction: column;
}

.core-form-group label,
.core-field-header label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}



/* =========================================================
   TABS
   ========================================================= */

.core-tabs {
    width: 100%;
}

.core-tab-buttons {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 1px solid #d8d8d8;
}

.core-tab-button {
    border: 1px solid #d8d8d8;
    border-bottom: none;
    background: #f2f2f2;
    padding: 11px 18px;
    cursor: pointer;
    font: inherit;
    color: #555;
    border-radius: 6px 6px 0 0;
}

.core-tab-button:hover {
    background: #e9e9e9;
}

.core-tab-button.active {
    background: #fff;
    color: #222;
    font-weight: 600;
    position: relative;
    top: 1px;
}

.core-tab-content {
    display: none;
    padding-top: 20px;
}

.core-tab-content.active {
    display: block;
}


/* =========================================================
   AUF-/ZUKLAPPBARE BEREICHE
   ========================================================= */

.core-fold {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #fff;
}

.core-fold summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 600;
    list-style-position: inside;
}

.core-fold summary:hover {
    background: #f7f7f7;
}

.core-fold-content {
    padding: 4px 14px 14px 14px;
}


/* =========================================================
   PLACEHOLDER
   ========================================================= */

.core-placeholder {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f8f8f8;
    border: 1px dashed #ccc;
    border-radius: 6px;
}

.core-placeholder p {
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   FELDKOPF
   --------------------------------------------------------- */

.core-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.core-field-header label {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */

.core-button-small {
    padding: 6px 10px;
    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   AKTIONEN
   --------------------------------------------------------- */

.core-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .core-workspace {
        grid-template-columns: 1fr;
    }

    .core-textarea-large {
        min-height: 400px;
    }

}

@media (max-width: 600px) {

    .core-page-header {
        flex-direction: column;
    }

    .core-toolbar {
        flex-wrap: wrap;
    }

    .core-field-header {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   CORE NAVIGATION
   ========================================================= */

.core-navigation {
    width: 100%;
    border-bottom: 1px solid #ddd;
    background: #fff;
    margin-bottom: 30px;
}

.core-navigation-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.core-navigation-brand a {
    color: #222;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
}

.core-navigation-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.core-navigation-links a {
    display: inline-block;

    padding: 8px 14px;

    color: #555;
    text-decoration: none;

    border-radius: 6px;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.core-navigation-links a:hover {
    background: #f2f2f2;
    color: #222;
}

.core-navigation-links a.active {
    background: #e9e9e9;
    color: #222;
    font-weight: 600;
}


/* =========================================================
   LOGIN – kompakte, zentrierte Karte
   ========================================================= */

.core-login-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 20px;
}

.core-login-card {
    padding: 30px;
}

.core-login-card .core-form {
    max-width: none;
}

.core-login-card .core-button {
    width: 100%;
}