:root {
    --sidebar-width: 280px;
}

body {
    background-color: #f4f6f9;
    min-height: 100vh;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* Bot cards */
.bot-card {
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.bot-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.bot-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.bot-status.active { background: #28a745; }
.bot-status.inactive { background: #dc3545; }

/* Editor layout */
.editor-wrapper {
    display: flex;
    height: calc(100vh - 56px);
    margin: -1.5rem;
}

.editor-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
}

.editor-canvas {
    flex: 1;
    position: relative;
    background: #f0f2f5;
    overflow: hidden;
}

.editor-props {
    width: 320px;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
}

.node-type-item {
    padding: 10px 14px;
    margin: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    transition: background 0.15s;
}

.node-type-item:hover {
    background: #e9ecef;
}

.node-type-item i {
    margin-right: 8px;
    width: 18px;
    text-align: center;
}

/* Drawflow overrides */
.drawflow {
    background: #f0f2f5 !important;
}

.drawflow .drawflow-node {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.drawflow .drawflow-node.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.25);
}

.drawflow .drawflow-node .title-box {
    background: #0d6efd;
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
}

.drawflow .drawflow-node .box {
    padding: 10px 12px;
    font-size: 13px;
    color: #333;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
}

/* Buttons in empty states */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Rich node content in Drawflow */
.drawflow .drawflow-node {
    min-width: 220px;
    max-width: 320px;
}

.drawflow .drawflow-node .box {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #333;
    word-wrap: break-word;
    white-space: pre-wrap;
    max-height: 180px;
    overflow-y: auto;
}

.drawflow .drawflow-node .node-text {
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.drawflow .drawflow-node .node-media {
    font-size: 11px;
    color: #0d6efd;
    margin-bottom: 4px;
}

.drawflow .drawflow-node .node-meta {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
}

.drawflow .drawflow-node .node-placeholder {
    color: #adb5bd;
    font-style: italic;
}

.drawflow .drawflow-node .node-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.drawflow .drawflow-node .node-btn {
    display: inline-block;
    background: #e7f1ff;
    color: #0d6efd;
    border: 1px solid #b6d4fe;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.3;
}

.drawflow .drawflow-node .node-btn-url {
    background: #f0f0f0;
    color: #495057;
    border-color: #ced4da;
}
