/* --- Modern Kads Platform Stylesheet --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #343a40;
    --border-color: #dee2e6;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container, .small-container, .medium-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}
.small-container { max-width: 960px; }
.medium-container { max-width: 720px; }

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
p { margin-top: 0; margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

/* --- Header & Navigation --- */
.nav {
    background: var(--card-bg);
    padding: 0.5rem 0;
    box-shadow: var(--box-shadow);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.nav .nav-container { align-items: center; }
.nav .brand img { height: 40px; width: auto; }
.nav .links a {
    color: var(--text-color);
    margin-left: 1rem;
    padding: 0.5rem 0;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.nav .links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}
.nav .links a.button {
    color: #fff;
    background-color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}
.nav .links a.button:hover { background-color: var(--primary-hover); }
.nav .links a.muted-button {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}
.nav .links a.muted-button:hover { background-color: #e2e6ea; }


/* --- Cards and Layout --- */
.brd, .card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}
.flex-row { display: flex; flex-wrap: wrap; margin: 0 -0.75rem; }
.flex-small, .flex-large { padding: 0 0.75rem; }
.top { margin-top: 2rem; }
.text-right { text-align: right; }
.space-between { justify-content: space-between; }
.align-center { align-items: center; }

/* --- Forms --- */
label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--card-bg);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
input[readonly].copy-on-click {
    cursor: pointer;
    background-color: var(--light-color);
}
.button, button, input[type="submit"] {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
button:hover, .button:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; }
.button.red { background-color: var(--danger-color); border-color: var(--danger-color); }
.button.red:hover { background-color: #bb2d3b; border-color: #b02a37; }
.muted-button {
    color: var(--text-color);
    background-color: var(--light-color);
    border-color: var(--border-color);
}
.muted-button:hover { background-color: #e2e6ea; }
.full-button { width: 100%; }


/* --- Tables --- */
.contain-table { overflow-x: auto; }
table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-color);
    vertical-align: top;
    border-color: var(--border-color);
    border-collapse: collapse;
}
thead { vertical-align: bottom; }
th, td { padding: 0.75rem; border: 1px solid var(--border-color); }
th { font-weight: 700; text-align: left; }
tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.02); }


/* --- Utilities & Colors --- */
.vertical-center { display: flex; align-items: center; justify-content: center; }
.nmb { font-size: 2.5rem !important; margin: 0; }
.colgreen { color: var(--success-color) !important; }
.colred { color: var(--danger-color) !important; }
.colyellow { color: #664d03 !important; } /* For pending status */

.formin { padding: 3rem 2rem; }

/* --- Footer --- */
.copyright {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--secondary-color);
}
.copyright a { color: var(--secondary-color); font-weight: 500; }

/* --- NEW: Analytics Chart Styles --- */
.kads-analytics-chart {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.kads-chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    position: relative;
}
.kads-chart-bar {
    flex: 1;
    background-color: #a9c7e8;
    margin: 0 1px;
    position: relative;
    text-align: center;
    transition: background-color 0.2s;
}
.kads-chart-bar:hover {
    background-color: var(--primary-color);
}
.kads-chart-bar .tooltip {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 105%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}
.kads-chart-bar:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
.kads-chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
    padding-top: 5px;
}
.kads-chart-labels span {
    flex: 1;
    text-align: center;
}
