@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4361ee;
    --sidebar-bg: #ffffff;
    --sidebar-text: #2b2b2b;
    --bg-color: #f4f7fe;
    --card-bg: #ffffff;
    --text-main: #2b3674;
    --text-muted: #a3aed1;
    --border-color: #e2e8f0;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
}

/* Sidebar Styles */
.sidebar-wrapper {
    width: 250px;
    background: var(--sidebar-bg);
    min-height: 100vh;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    padding: 15px 10px;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: var(--primary-color);
    color: #fff;
}

.main-content {
    margin-left: 250px;
    padding: 20px 30px;
    min-height: 100vh;
}

/* Header navbar inside main content */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: #fff;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Modern Metric Cards */
.metric {
    background: var(--card-bg);
    border: none;
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.metric:hover {
    transform: translateY(-5px);
}

.metric span {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.metric strong {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.metric-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 40px;
    opacity: 0.1;
    color: inherit;
}

.metric-gradient-1 { background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%); color: #fff; }
.metric-gradient-1 span, .metric-gradient-1 strong { color: #fff; }
.metric-gradient-2 { background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%); color: #fff; }
.metric-gradient-2 span, .metric-gradient-2 strong { color: #fff; }
.metric-gradient-3 { background: linear-gradient(135deg, #f72585 0%, #b5179e 100%); color: #fff; }
.metric-gradient-3 span, .metric-gradient-3 strong { color: #fff; }
.metric-gradient-4 { background: linear-gradient(135deg, #f8961e 0%, #f3722c 100%); color: #fff; }
.metric-gradient-4 span, .metric-gradient-4 strong { color: #fff; }

.panel, .card-modern {
    background: var(--card-bg);
    border: none;
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.table {
    background: transparent;
    margin-bottom: 0;
}

.table-wrapper {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.table thead th {
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    padding: 15px 8px;
}

.auth-page {
    min-height: 100vh;
    background: #eef2f6;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 420px);
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    padding: 24px;
}

.token-code {
    display: block;
    max-width: 260px;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.connector-endpoint {
    display: grid;
    gap: 4px;
    background: #f6f7f9;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    padding: 12px;
}

.sheet-format-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sheet-format-grid div {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}

.sheet-format-grid strong,
.sheet-format-grid span {
    display: block;
}

.sheet-format-grid span {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
}

.preview-table {
    max-height: 360px;
    overflow: auto;
}

.credential-box {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}

.log-payload {
    white-space: pre-wrap;
    max-width: 520px;
    max-height: 220px;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.draft-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.article-editor {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}

.move-select {
    width: 180px;
}

.move-date {
    width: 170px;
}
