/* ============================================
   SHORT URL - SUPER ELEGANT STYLE
   Putih Biru Cerah Transparant
   ============================================ */

:root {
    --primary: #3b82f6;
    --primary-light: #93c5fd;
    --primary-dark: #1d4ed8;
    --primary-bg: rgba(59, 130, 246, 0.08);
    --secondary: #60a5fa;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    --shadow-lg: 0 8px 32px rgba(59, 130, 246, 0.12);
    --radius: 3px;
    --radius-sm: 2px;
    --sidebar-width: 240px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f4f9;
    color: var(--dark);
    min-height: 100vh;
}

/* ============================================
   SIDEBAR - Transparant White
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(59, 130, 246, 0.1);
    z-index: 100;
    overflow-y: auto;
    transition: 0.3s;
}

.sidebar-brand img {
    display: flex;
    margin: auto;
    width: 90px;
}

.sidebar-user {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.sidebar-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user .user-role {
    font-size: 12px;
    color: var(--gray);
}

.sidebar-nav {
    padding: 12px 8px;
}

.sidebar-nav .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--gray);
    text-decoration: none;
    border-radius: var(--radius);
    transition: 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav .sidebar-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 3px;
}

.sidebar-nav .sidebar-link.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 3px;
}

.sidebar-nav .sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f0f4f9;
}

/* ============================================
   TOP BAR - Transparant
   ============================================ */
.top-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 28px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar .page-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.top-bar .page-title i {
    color: var(--primary);
    margin-right: 8px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--gray);
}

/* ============================================
   CONTENT
   ============================================ */
.content {
    padding: 24px 28px;
}

/* ============================================
   STATS CARDS - Transparant
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid rgba(59, 130, 246, 0.06);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.stat-card .stat-icon.primary {
    color: var(--primary);
}

.stat-card .stat-icon.success {
    color: var(--success);
}

.stat-card .stat-icon.warning {
    color: var(--warning);
}

.stat-card .stat-icon.info {
    color: var(--info);
}

.stat-card .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}

/* ============================================
   SECTION CARD - Transparant
   ============================================ */
.section-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 20px 24px;
    border: 1px solid rgba(59, 130, 246, 0.06);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.section-header h2 i {
    color: var(--primary);
    margin-right: 8px;
}

/* ============================================
   USER CARDS
   ============================================ */
.user-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.user-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid rgba(59, 130, 246, 0.06);
    transition: 0.3s;
}

.user-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.user-card .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================
   TABLE
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.04);
    font-weight: 600;
    color: var(--gray);
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.04);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(59, 130, 246, 0.02);
}

.table .long-url {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   TABLE URL - CENTER ALIGN & PROPORTIONAL
   ============================================ */
/* ============================================
   SHORT URL - SUPER ELEGANT STYLE
   Putih Biru Cerah Transparant
   ============================================ */

:root {
    --primary: #3b82f6;
    --primary-light: #93c5fd;
    --primary-dark: #1d4ed8;
    --primary-bg: rgba(59, 130, 246, 0.08);
    --secondary: #60a5fa;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    --shadow-lg: 0 8px 32px rgba(59, 130, 246, 0.12);
    --radius: 3px;
    --radius-sm: 2px;
    --sidebar-width: 240px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f4f9;
    color: var(--dark);
    min-height: 100vh;
}

/* ============================================
   SIDEBAR - Transparant White
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(59, 130, 246, 0.1);
    z-index: 100;
    overflow-y: auto;
    transition: 0.3s;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.sidebar-brand .brand-icon {
    font-size: 28px;
    background: var(--primary-bg);
    padding: 8px;
    border-radius: var(--radius);
}

.sidebar-brand .brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.sidebar-user {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.sidebar-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user .user-role {
    font-size: 12px;
    color: var(--gray);
}

.sidebar-nav {
    padding: 12px 8px;
}

.sidebar-nav .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--gray);
    text-decoration: none;
    border-radius: var(--radius);
    transition: 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav .sidebar-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 3px;
}

.sidebar-nav .sidebar-link.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 3px;
}

.sidebar-nav .sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f0f4f9;
}

/* ============================================
   TOP BAR - Transparant
   ============================================ */
.top-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 28px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar .page-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.top-bar .page-title i {
    color: var(--primary);
    margin-right: 8px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--gray);
}

/* ============================================
   CONTENT
   ============================================ */
.content {
    padding: 24px 28px;
}

/* ============================================
   STATS CARDS - Transparant
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid rgba(59, 130, 246, 0.06);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.stat-card .stat-icon.primary {
    color: var(--primary);
}

.stat-card .stat-icon.success {
    color: var(--success);
}

.stat-card .stat-icon.warning {
    color: var(--warning);
}

.stat-card .stat-icon.info {
    color: var(--info);
}

.stat-card .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}

/* ============================================
   SECTION CARD - Transparant
   ============================================ */
.section-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 20px 24px;
    border: 1px solid rgba(59, 130, 246, 0.06);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.section-header h2 i {
    color: var(--primary);
    margin-right: 8px;
}

/* ============================================
   USER CARDS
   ============================================ */
.user-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.user-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 18px 20px;
    border: 1px solid rgba(59, 130, 246, 0.06);
    transition: 0.3s;
}

.user-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.user-card .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================
   TABLE
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.04);
    font-weight: 600;
    color: var(--gray);
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.04);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(59, 130, 246, 0.02);
}

/* ============================================
   TABLE URL - CENTER ALIGN & PROPORTIONAL
   ============================================ */
.url-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.url-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.url-table th,
.url-table td {
    text-align: center;
    padding: 10px 12px;
    vertical-align: middle;
    word-wrap: break-word;
}

/* Kolom Short Code - fixed */
.url-table .col-code {
    width: 110px;
    min-width: 90px;
    max-width: 130px;
}

/* Kolom Short URL - DIPERBESAR */
.url-table .col-short {
    width: 300px;
    min-width: 250px;
    max-width: 350px;
}

.url-table .col-short .short-url-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    flex-wrap: nowrap;
}

.url-table .col-short .short-url-wrapper .short-url-link {
    word-break: break-all;
    font-size: 13px;
    text-decoration: none;
    color: #3b82f6;
    text-align: center;
    flex: 0.8;
    min-width: 60px;
    pointer-events: none;
}

.url-table .col-short .btn-copy {
    padding: 2px 8px;
    font-size: 12px;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: 0.2s;
}

.url-table .col-short .btn-copy:hover {
    color: #3b82f6;
    transform: scale(1.1);
}

/* Kolom Long URL - DIPERKECIL & PROPORSIONAL */
.url-table .col-long {
    width: 280px;
    min-width: 200px;
    max-width: 350px;
}

.url-table .col-long .long-url-text {
    word-break: break-all;
    white-space: normal;
    line-height: 1.4;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-table .col-long .long-url-text:hover {
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Kolom User - fixed */
.url-table .col-user {
    width: 110px;
    min-width: 90px;
    max-width: 140px;
}

/* Kolom Clicks - fixed */
.url-table .col-clicks {
    width: 80px;
    min-width: 60px;
    max-width: 100px;
}

/* Kolom Status - fixed */
.url-table .col-status {
    width: 100px;
    min-width: 80px;
    max-width: 120px;
}

/* Kolom Aksi - fixed */
.url-table .col-actions {
    width: 130px;
    min-width: 110px;
    max-width: 160px;
}

.url-table th {
    background: rgba(59, 130, 246, 0.04);
    font-weight: 600;
    color: var(--gray);
    border-bottom: 2px solid rgba(59, 130, 246, 0.08);
}

.url-table td {
    border-bottom: 1px solid rgba(59, 130, 246, 0.04);
}

.url-table tr:hover td {
    background: rgba(59, 130, 246, 0.02);
}

/* Actions button group */
.url-table .btn-group {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.url-table .btn-group .btn {
    padding: 4px 8px;
    font-size: 12px;
    min-width: 28px;
}

/* Toast notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-container .toast {
    padding: 12px 20px;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast-container .toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-container .toast.success {
    background: #22c55e;
}

.toast-container .toast.error {
    background: #ef4444;
}

.toast-container .toast.info {
    background: #3b82f6;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--dark);
}

.form-group label i {
    color: var(--primary);
    margin-right: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: 0.2s;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.2);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    animation: slideUp 0.25s ease;
    border: 1px solid rgba(59, 130, 246, 0.08);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.modal-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gray);
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked+label {
    background: var(--primary);
}

.toggle-switch input:checked+label:before {
    transform: translateX(20px);
}

/* ============================================
   USER CARD - IMPROVED
   ============================================ */
.user-card .user-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.user-card .user-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 30px;
}

.user-card .user-actions .btn i {
    font-size: 12px;
}

/* Toggle Switch kecil untuk card */
.toggle-switch-sm {
    position: relative;
    width: 36px;
    height: 20px;
    display: inline-block;
    flex-shrink: 0;
}

.toggle-switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch-sm label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-switch-sm label:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-switch-sm input:checked+label {
    background: var(--primary);
}

.toggle-switch-sm input:checked+label:before {
    transform: translateX(16px);
}

.ip-restriction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
}

.ip-restriction-badge.active {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.ip-restriction-badge.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

/* ============================================
   TOGGLE SWITCH MODERN - BAGUS
   ============================================ */
.ip-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch-modern {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch-modern input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-switch-modern label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.toggle-switch-modern label .toggle-slider {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.toggle-switch-modern input:checked + label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.toggle-switch-modern input:checked + label .toggle-slider {
    transform: translateX(20px);
}

.toggle-switch-modern input:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch-modern:hover label {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    transition: 0.3s;
    min-width: 50px;
}

.toggle-label.active {
    color: var(--primary);
    font-weight: 600;
}

.toggle-label.inactive {
    color: var(--gray);
}

/* Animasi toggle */
.toggle-switch-modern input:checked + label .toggle-slider {
    animation: toggleSlide 0.3s ease;
}

@keyframes toggleSlide {
    0% { transform: translateX(0); }
    50% { transform: translateX(24px); }
    100% { transform: translateX(20px); }
}

/* IP Form Container */
.ip-form-container {
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.08);
    animation: fadeSlideDown 0.3s ease;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 36px;
    justify-content: center;
}

/* ============================================
   FILTER FORM
   ============================================ */
.filter-form .form-group {
    margin-bottom: 0;
}

.filter-form input,
.filter-form select {
    padding: 8px 12px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .user-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .url-table .col-short {
        width: 240px;
        min-width: 180px;
        max-width: 280px;
    }

    .url-table .col-long {
        width: 200px;
        min-width: 150px;
        max-width: 280px;
    }

    .url-table .col-actions {
        width: 110px;
        min-width: 90px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }

    .section-card {
        padding: 16px;
    }

    .user-grid {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-box {
        padding: 20px;
        margin: 10px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .url-table .col-short {
        width: 180px;
        min-width: 130px;
        max-width: 220px;
    }

    .url-table .col-long {
        width: 150px;
        min-width: 120px;
        max-width: 200px;
    }

    .url-table .col-actions {
        width: 100px;
        min-width: 80px;
    }

    .url-table .col-code {
        width: 80px;
        min-width: 60px;
    }

    .url-table .col-user {
        width: 80px;
        min-width: 60px;
    }

    .url-table .col-clicks {
        width: 60px;
        min-width: 50px;
    }

    .url-table .col-status {
        width: 80px;
        min-width: 60px;
    }

    .url-table th,
    .url-table td {
        padding: 6px 8px;
        font-size: 12px;
    }

    .url-table .col-short .short-url-wrapper .short-url-link {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px 14px;
    }

    .stat-card .stat-number {
        font-size: 18px;
    }

    .url-table .col-short {
        width: 130px;
        min-width: 100px;
        max-width: 160px;
    }

    .url-table .col-long {
        width: 120px;
        min-width: 80px;
        max-width: 160px;
    }

    .url-table .col-actions {
        width: 85px;
        min-width: 70px;
    }

    .url-table .col-code {
        width: 60px;
        min-width: 50px;
    }

    .url-table .col-user {
        width: 60px;
        min-width: 50px;
    }

    .url-table .col-clicks {
        width: 50px;
        min-width: 40px;
    }

    .url-table .col-status {
        width: 70px;
        min-width: 60px;
    }

    .url-table .col-short .short-url-wrapper .btn-copy {
        padding: 1px 6px;
        font-size: 10px;
    }

    .url-table .col-short .short-url-wrapper {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--dark);
}

.form-group label i {
    color: var(--primary);
    margin-right: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: 0.2s;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--gray);
}

.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.2);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    animation: slideUp 0.25s ease;
    border: 1px solid rgba(59, 130, 246, 0.08);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.modal-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gray);
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked+label {
    background: var(--primary);
}

.toggle-switch input:checked+label:before {
    transform: translateX(20px);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 36px;
    justify-content: center;
}

/* ============================================
   FILTER FORM
   ============================================ */
.filter-form .form-group {
    margin-bottom: 0;
}

.filter-form input,
.filter-form select {
    padding: 8px 12px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .user-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }

    .section-card {
        padding: 16px;
    }

    .user-grid {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-box {
        padding: 20px;
        margin: 10px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px 14px;
    }

    .stat-card .stat-number {
        font-size: 18px;
    }
}


/* WhatsApp */
.wa-float {
   position: fixed;
   right: 20px;
   bottom: 20px;
   z-index: 999;
   background-color: #25D366;
   padding: 8px 10px;
   border-radius: 50%;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
   transition: transform 0.3s ease;
}

.wa-float:hover {
   transform: scale(1.1);
}

.wa-float img {
   width: 30px;
   height: 30px;
}