/* ShortLynk2 — Custom styles layered over Tailwind CDN */

/* Sidebar active state */
.nav-item.active {
    background-color: #2563eb;
    color: #fff;
}

/* Card hover lift */
.stat-card:hover {
    transform: translateY(-2px);
    transition: transform .15s ease;
}

/* Table row hover */
.link-row:hover {
    background-color: #f8fafc;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 500;
}
.badge-active   { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f3f4f6; color: #374151; }
.badge-expired  { background: #fee2e2; color: #991b1b; }
.badge-campaign { background: #dbeafe; color: #1e40af; }
.badge-tag      { background: #ede9fe; color: #5b21b6; }
.badge-spring-sale { background: #fef3c7; color: #92400e; }

/* Flash message */
.flash-success { background:#dcfce7; border-left:4px solid #16a34a; color:#166534; }
.flash-error   { background:#fee2e2; border-left:4px solid #dc2626; color:#991b1b; }
.flash-info    { background:#dbeafe; border-left:4px solid #2563eb; color:#1e40af; }

/* Chart container */
.chart-container { position: relative; height: 220px; }

/* Sidebar */
.sidebar { width: 240px; min-height: 100vh; background: #1e293b; flex-shrink: 0; }
.sidebar-logo { padding: 1.5rem; display: flex; align-items: center; gap: .6rem; }
.sidebar-logo span { font-size: 1.25rem; font-weight: 700; color: #fff; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.25rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: .375rem;
    margin: 2px .75rem;
    font-size: .875rem;
    transition: background .12s, color .12s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #2563eb;
    color: #fff;
}
.sidebar-nav a.active svg { color: #fff; }
.sidebar-footer { padding: 1rem .75rem; border-top: 1px solid #334155; }

/* Top bar */
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem; }

/* Main content */
.main-content { flex: 1; overflow-y: auto; background: #f1f5f9; }
.page-body { padding: 1.5rem 2rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .75rem 1rem; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; border-bottom: 2px solid #e5e7eb; background: #f9fafb; }
.data-table td { padding: .875rem 1rem; border-bottom: 1px solid #f3f4f6; font-size: .875rem; }
.data-table tr:last-child td { border-bottom: none; }

/* Forms */
.form-group label { display: block; font-size: .875rem; font-weight: 500; color: #374151; margin-bottom: .375rem; }
.form-control {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    font-size: .875rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: .375rem; font-size: .875rem; font-weight: 500; cursor: pointer; border: none; text-decoration: none; transition: background .12s, opacity .12s; }
.btn-primary  { background: #2563eb; color: #fff; }
.btn-primary:hover  { background: #1d4ed8; }
.btn-ghost   { background: transparent; color: #374151; border: 1px solid #d1d5db; }
.btn-ghost:hover   { background: #f3f4f6; }
.btn-danger  { background: #ef4444; color: #fff; }
.btn-danger:hover  { background: #dc2626; }
.btn-sm { padding: .3rem .65rem; font-size: .75rem; }
