/* ---------- COMMON ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

/* ---------- LOGIN PAGE ---------- */
.login-body {
    background: linear-gradient(135deg, #22bdd8, #2b2f77);
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-title {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    font-weight: 700;
    color: #000;
}

.login-card {
    background: #f8f7f6;
    padding: 200px;
    width: 600px;   
    height: auto;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.login-card h2 {
    margin-bottom: 8px;
    color: #0e093b;
}
.login-card h2 {
    margin-top: 40px;
}

.login-card p {
    color: #555;
    margin-bottom: 25px;
    font-size: 14px;
}

/* ---------- DASHBOARD ---------- */
.dashboard-body {
    background: linear-gradient(135deg, #f4f6fb, #e8ecf5);
    padding: 40px;
}

.dashboard-container {
    max-width: 900px;
    margin: auto;
    background: #ffffff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h2 {
    color: #0e093b;
}

.logout-btn {
    cursor: pointer;
    font-size: 14px;
    color: #d9534f;
}

/* ---------- FORM ---------- */
label {
    display: block;
    margin-top: 18px;
    font-weight: 600;
    color: #333;
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

button {
    margin-top: 28px;
    padding: 14px;
    width: 5%;
    background: #e3e3e6;
    color: #0d09ce;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #1f1b5e;
}
:root {
    --sidebar-bg: #0e093b;
    --sidebar-hover: rgba(255,255,255,0.15);
    --white: #ffffff;
}

/* LAYOUT */
.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.layout_sidebar {
    width: 240px;
    background: linear-gradient(180deg, #6fb478, #599657);
    color: white;
    padding: 20px;
    transition: width 0.3s ease;
}

.layout_sidebar.collapsed {
    width: 70px;
}

/* TOGGLE */
.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    margin-bottom: 20px;
}

/* LOGO */
.sidebar-logo {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 30px;
}

/* LINKS */
.sidebar-link {
    display: block;
    padding: 12px 14px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
}

.sidebar-link.active {
    background: white;
    color: #0e093b;
    font-weight: 600;
}

.logout-link {
    margin-top: 30px;
    background: rgba(255,255,255,0.1);
}

/* CONTENT */
.layout_content {
    flex: 1;
    padding: 40px;
    background: #f4f6fb;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Inter, Arial, sans-serif; background: #f5f8fc; }

.app {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0b1c3d, #0e2a68);
    color: #ffffff;
    padding: 20px;
    position: fixed;        /* 🔥 IMPORTANT */
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
        z-index: 9999;
}

.sidebar-logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
}

.sidebar nav a {
    display: block;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.9;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,0.15);
}

.sidebar .logout {
    margin-top: 30px;
    background: rgba(255,255,255,0.1);
}

/* MAIN */
.main {
    margin-left: 240px;
    flex: 1;
    padding: 100px 32px 32px 32px;
    background: #f5f8fc;
    /* position: relative;  */
}

/* TOPBAR */
/* Make sure the body and content are properly spaced */
body {
    margin: 0;
    padding: 0;
}

/* Main content container, with extra margin for fixed header */
.main-content {
    display: flex;
    flex-direction: column;
    margin-top: 80px; /* Adjust this based on your fixed topbar height */
}

/* Fixed topbar */
.topbar {
    position: fixed;  
    /* position: absolute;  */
    top: 0;
    left: 23px;           
    right: 0;          
    left: 240px; 
    width: calc(100% - 240px); 
    z-index: 1000;
    background-color: #2f3763;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #dbeafe;
}

/* Container for Keyword Research with margin to avoid overlap with fixed header */
.keyword-research-container {
    margin-top: 100px; /* Adjust this if the topbar height changes */
    padding: 20px;
    width: 100%;
    overflow-x: auto; /* Allows horizontal scrolling if necessary */
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px; /* Ensures the table does not shrink */
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* Prevents text from wrapping */
}

/* Styling for the table header */
th {
    background-color: #f4f4f4;
}

/* Pagination control styling */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 10px;
    border: none;
    background-color: #ddd;
    margin: 0 5px;
    cursor: pointer;
}

.pagination button:hover {
    background-color: #ccc;
}

/* CONTENT */
.content {
    padding: 24px;
}

/* CARDS */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kpi-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.kpi-card h2 {
    margin: 8px 0;
}

.positive { color: green; }
.negative { color: red; }

/* ALERT */
.alert {
    background: #fff;
    border-left: 4px solid red;
    padding: 20px;
    margin-top: 20px;
    border-radius: 12px;
}

/* BUTTONS */
button {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #e5e7eb;
}

.btn-outline {
    border: 1px solid #2563eb;
    background: transparent;
    color: #2563eb;
}
/* ================= PAGE TITLE ================= */

/* Container for the page title */
.page-title {
    position: sticky; /* This will make it stick to the top */
    top: 0; /* Stick to the top of the screen */
    background-color: #fff; /* Ensure a white background for visibility */
    padding: 15px 20px; /* Adjust the padding as needed */
    z-index: 1000; /* Ensures it's above other content */
    border-bottom: 1px solid #ddd; /* Optional: adds a border for separation */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional: adds a shadow for better visibility */
    width: 100%; /* Make sure it takes the full width */
    top: 0; /* Keeps it fixed at the top */
}

/* Styling for the page title text */
.page-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Styling for the description paragraph */
.page-title p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}


/* Optional: Add responsiveness for small screens */
@media (max-width: 768px) {
    .page-title h2 {
        font-size: 20px;
    }
    .page-title p {
        font-size: 12px;
    }
}

/* ================= FORM WRAPPER ================= */

.form-wrapper {
    max-width: 820px;
    margin: 0 auto;            /* 👈 THIS CENTERS IT */
    background: #ffffff;
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}


/* ================= FORM ================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}


/* ================= BUTTON ================= */

.btn-primary {
    margin-top: 10px;
    padding: 12px 22px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    width: auto;              /* 👈 NOT FULL WIDTH */
}

.btn-primary:hover {
    background: #1e40af;
}
.keyword-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.keyword-table th,
.keyword-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

.keyword-table th {
    background: #FFEB3B;
    font-weight: 800;
    color: #0e093b;
}

/* BADGES */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.low { background: #dcfce7; color: #166534; }
.medium { background: #fef3c7; color: #92400e; }
.high { background: #fee2e2; color: #991b1b; }
.good { background: #dbeafe; color: #1e40af; }
.excellent { background: #ede9fe; color: #5b21b6; }

.up { color: green; font-weight: bold; }
.stable { color: #6b7280; }

.kp-container {
max-width: 900px;
margin: 40px auto;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
padding: 25px;
}
.kp-tabs {
display: flex;
border-bottom: 2px solid #eee;
margin-bottom: 20px;
}
.kp-tab {
padding: 12px 20px;
cursor: pointer;
font-weight: 600;
color: #666;
}
.kp-tab.active {
color: #1a73e8;
border-bottom: 3px solid #1a73e8;
}
.kp-form {
display: none;
}
.kp-form.active {
display: block;
}
.kp-field {
margin-bottom: 15px;
}
.kp-field label {
font-weight: 600;
display: block;
margin-bottom: 5px;
}
.kp-field input, .kp-field select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
.kp-actions {
display: flex;
gap: 15px;
margin-top: 15px;
}
.kp-btn {
background: #1a73e8;
color: #fff;
border: none;
padding: 10px 22px;
border-radius: 5px;
cursor: pointer;
font-weight: 600;   
}

.lang-select {
  height: 160px;        /* visible options */
  overflow-y: auto;     /* SCROLL ENABLE */
}
/* ===== Layout ===== */
.kp-container{max-width:1100px;margin:40px auto;background:#fff;
border-radius:8px;box-shadow:0 2px 12px rgba(0,0,0,.1);padding:25px}
.kp-title{font-size:22px;font-weight:600;margin-bottom:20px}

/* ===== Tabs ===== */
.kp-tabs{display:flex;border-bottom:2px solid #eee;margin-bottom:20px}
.kp-tab{padding:12px 20px;cursor:pointer;font-weight:600;color:#666}
.kp-tab.active{color:#1a73e8;border-bottom:3px solid #1a73e8}

/* ===== Forms ===== */
.kp-form{display:none}
.kp-form.active{display:block}
.kp-field{margin-bottom:18px}
.kp-field label{font-weight:600;display:block;margin-bottom:6px}
.kp-field input{width:100%;padding:10px;border:1px solid #ccc;border-radius:5px}

/* ===== Button ===== */
.kp-btn{background:#1a73e8;color:#fff;border:none;
padding:12px;border-radius:5px;font-weight:600;width:100%}

/* ===== Select box ===== */
.select-box{border:1px solid #ccc;padding:10px;border-radius:5px;
cursor:pointer;display:flex;justify-content:space-between;background:#fff}

/* ===== Website targeting ===== */
.website-targeting{margin-top:10px}
.wt-title{font-weight:600;margin-bottom:10px}
.wt-option{margin-bottom:12px}
.wt-option label{display:flex;align-items:center;gap:10px;font-size:14px}
.wt-option input{transform:scale(1.1)}
.wt-url{margin-left:28px;margin-top:6px;font-size:13px;color:#1a73e8}

/* ===== Modal ===== */
.modal-overlay{display:none;position:fixed;inset:0;
background:rgba(0,0,0,.45);z-index:9999;
justify-content:center;align-items:center}
.modal-box{background:#fff;border-radius:8px;padding:15px}
.modal-header{font-size:18px;font-weight:600;margin-bottom:10px}
.modal-body input{width:100%;padding:8px;margin-bottom:10px}
.modal-list{max-height:320px;overflow-y:auto;border:1px solid #eee}
.modal-list div{padding:8px;border-bottom:1px solid #eee;cursor:pointer}
.modal-list div:hover{background:#e8f0fe}

/* ===== Location modal ===== */
.location-modal{width:1000px}
.location-body{display:flex;gap:15px}
.location-left{width:35%}
.location-right{width:65%}
#map{height:420px;border-radius:6px}
.modal-actions{margin-top:10px;display:flex;justify-content:flex-end;gap:10px}
.primary{background:#1a73e8;color:#fff;border:none;padding:8px 18px}

.pagination-bar {
    display: flex;
    justify-content: flex-end;
    align-items: right;
    gap: 6px;
    margin: 20px;
}

/* IMPORTANT FIX */
#pageNumbers {
    display: flex;
    gap: 6px;
}

.pagination-btn,
.page-number {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
}

.page-number.active {
    background: #1f235a;
    color: #fff;
    border-color: #1f235a;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* Apply this to the table or specific columns to handle long text */
.keyword-column, /* Add appropriate class or ID for the column containing keywords */
.landing-page-column, /* Add appropriate class or ID for the landing page column */
.targeted-column {  /* Adjust this for other columns if needed */
    word-wrap: break-word;      /* Ensure long words are wrapped */
    white-space: normal;        /* Allow text to break and wrap */
    overflow-wrap: break-word;  /* Support overflow wrapping in older browsers */
    max-width: 300px;           /* Optionally, set max width for the column */
}
