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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #3b82f6;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
}

body.dark-mode {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --bg-light: #0f172a;
    --white: #1e293b;
    --border: #334155;
}

body.dark-mode .ts-header, body.dark-mode .ts-nav a:not(.active), body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: var(--text-dark); }
body.dark-mode .ts-header { background: rgba(30, 41, 59, 0.95); border-bottom-color: var(--border); }
body.dark-mode .ts-shortener-card, body.dark-mode .jenis-card, body.dark-mode .pricing-card, body.dark-mode .template-card, body.dark-mode .demo-booking-box, body.dark-mode .demo-input { background: var(--white); border-color: var(--border); color: var(--text-dark); }
body.dark-mode .ts-sc-input-group { background: var(--bg-light); }
body.dark-mode .ts-sc-input-group input { color: var(--text-dark); }

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: background-color 0.3s, color 0.3s;
}

/* Dashboard & Admin Layout */
.dashboard-container { display: flex; min-height: calc(100vh - 70px); max-width: 1200px; margin: 20px auto; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.sidebar { width: 250px; background: #f8fafc; padding: 20px; border-right: 1px solid var(--border); }
.sidebar a { display: block; padding: 12px 15px; margin-bottom: 5px; color: var(--text-dark); text-decoration: none; border-radius: 8px; font-weight: 500; transition: background 0.2s;}
.sidebar a:hover { background: #e2e8f0; }
.sidebar a.active { background: var(--primary); color: white; }
.dashboard-content { flex: 1; padding: 30px; }

/* Table Styles */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; color: var(--text-muted); font-size: 14px; }
.status-badge { display: inline-block; white-space: nowrap; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-active { background: #d1fae5; color: #047857; }

/* Button & Cards */
.btn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.btn:hover { background: var(--primary-hover); }
.card { background: white; border: 1px solid var(--border); border-radius: 10px; }

/* Header */
.ts-header {
    background: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ts-logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 22px;
    color: var(--text-dark);
}

.ts-logo-icon {
    background: #2563eb;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    margin-right: 10px;
    font-size: 18px;
}

.ts-badge {
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ts-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ts-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.ts-nav a.active {
    color: var(--secondary);
}

.ts-nav a:hover {
    color: var(--primary);
}

.ts-nav a i {
    font-size: 18px;
    margin-bottom: -2px;
}

.btn-tutorial {
    border: 1px solid var(--secondary);
    color: var(--secondary) !important;
    padding: 8px 16px;
    border-radius: 20px;
    flex-direction: row !important;
    gap: 8px !important;
}
.btn-tutorial:hover {
    background: #eff6ff;
}

.ts-auth {
    display: flex;
    gap: 12px;
}

.btn-masuk {
    text-decoration: none;
    color: var(--text-dark);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    background: var(--white);
    transition: all 0.2s;
}
.btn-masuk:hover {
    background: #f1f5f9;
}

.btn-daftar {
    text-decoration: none;
    color: var(--white);
    background: var(--primary);
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-daftar:hover {
    background: var(--primary-hover);
}

/* Main Content */
.ts-main {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.ts-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.ts-toggle {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 30px;
    display: inline-flex;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ts-toggle button {
    background: transparent;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}

.ts-toggle button.active {
    background: #f8fafc;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ts-tag {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 25px;
}

.ts-hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(to right, #4f46e5, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ts-hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
}

/* Card Shortener */
.ts-shortener-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    text-align: left;
    border: 1px solid var(--border);
}

.ts-sc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}

.ts-sc-badge {
    color: #059669;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 12px;
}

.ts-sc-input-group {
    display: flex;
    gap: 15px;
}

.ts-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.ts-input-wrapper i {
    position: absolute;
    left: 15px;
    font-size: 20px;
    color: var(--text-muted);
}

.ts-input-wrapper input {
    width: 100%;
    padding: 20px 20px 20px 45px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ts-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-ringkas {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-ringkas:hover {
    background: var(--primary-hover);
}

/* Responsive */
@media (max-width: 1000px) {
    .ts-header { flex-wrap: wrap; gap: 15px; padding: 15px; justify-content: center; }
    .ts-header-left { flex-wrap: wrap; justify-content: center; gap: 20px !important; }
}

@media (max-width: 768px) {
    .hide-on-mobile { display: none !important; }
    .ts-header { flex-direction: column; padding: 15px; gap: 15px; }
    .ts-header-left { flex-direction: column; gap: 15px !important; width: 100%; }
    .ts-nav { 
        width: 100%; 
        overflow-x: auto; 
        justify-content: flex-start; 
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        gap: 15px !important;
    }
    .ts-nav::-webkit-scrollbar { height: 4px; }
    .ts-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
    
    .ts-nav a {
        min-width: max-content; /* Biarkan menu 1 baris menyusuaikan isinya di scroll */
    }
    
    .ts-auth { 
        width: 100%; 
        justify-content: center; 
        flex-wrap: wrap;
    }

    .ts-sc-input-group { flex-direction: column; }
    .btn-ringkas { padding: 20px; }
    .ts-hero h1 { font-size: 36px; }
}
