/* ============================================================
   DroidTester — Dashboard Layout Styles
   ============================================================ */

/* ── Page Layout ── */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-cream);
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: transparent;
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: transform var(--transition-normal);
}

.sidebar-logo {
    padding: 24px 20px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(27, 122, 67, 0.3);
}

.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 12px 20px 6px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    margin: 4px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 12px;
    text-decoration: none;
}

.sidebar-nav-item i {
    font-size: 17px;
    transition: color var(--transition-fast);
}

.sidebar-nav-item:hover {
    background: #F5F5F5;
    color: var(--primary);
    text-decoration: none;
}

.sidebar-nav-item:hover i {
    color: var(--primary);
}

.sidebar-nav-item.active {
    color: var(--text-primary);
    font-weight: 600;
    background: rgba(27, 122, 67, 0.1);
}

.sidebar-nav-item.active i {
    color: var(--primary);
}

.sidebar-download-card {
    margin: 16px;
    background: var(--gradient-green);
    border-radius: var(--border-radius-lg);
    padding: 20px 16px;
    text-align: center;
    color: #fff;
}

.sidebar-download-card .star-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: #FFD700;
}

.sidebar-download-card h6 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.sidebar-download-card p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
}

.sidebar-download-card .btn-download {
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: var(--border-radius-pill);
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-download-card .btn-download:hover {
    background: #f0f0f0;
}

/* ── Main Content Area ── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 0;
}

/* ── Top Header ── */
.top-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: transparent;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-light-green);
    border: 1px solid rgba(27, 122, 67, 0.2);
    border-radius: var(--border-radius-pill);
    padding: 10px 20px;
    max-width: 400px;
    flex: 1;
}

.search-bar i {
    color: var(--primary);
    font-size: 16px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--primary);
    width: 100%;
}

.search-bar input::placeholder {
    color: var(--primary);
    opacity: 0.7;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.header-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--primary);
}

.header-user-info .user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-user-info .user-email {
    font-size: 11px;
    color: var(--text-secondary);
}

.burger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 28px 20px;
}

.page-header-left h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.page-header-left p {
    font-size: 13px;
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Content Wrapper ── */
.content-wrapper {
    padding: 0 28px 28px;
}

/* ── Stat Cards ── */
.stat-card {
    background: #fff;
    border: 1.5px solid #F0DFD1;
    border-radius: var(--border-radius-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.stat-card .stat-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.stat-card .stat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.stat-card .stat-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.stat-card .stat-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.stat-card .wave-bg {
    position: absolute;
    right: -10px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* ── Campaign List Card ── */
.campaign-list-card {
    background: #fff;
    border: 1.5px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 20px;
}

.campaign-list-card .card-header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.campaign-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-cream);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}

.campaign-row:hover {
    background: rgba(27, 122, 67, 0.06);
    transform: translateX(2px);
}

.campaign-row:last-child {
    margin-bottom: 0;
}

.campaign-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.campaign-app-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.campaign-app-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.campaign-app-dev {
    font-size: 12px;
    color: var(--text-secondary);
}

.campaign-row .go-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.campaign-row .go-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* ── Campaign Table ── */
.campaigns-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.campaigns-table thead th {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0 14px 8px;
}

.campaigns-table tbody tr {
    background: var(--bg-cream);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.campaigns-table tbody tr:hover {
    background: rgba(27, 122, 67, 0.06);
}

.campaigns-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
}

.campaigns-table tbody td:first-child {
    border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.campaigns-table tbody td:last-child {
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

/* ── Pagination ── */
.pagination-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-custom .page-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--card-border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.pagination-custom .page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Show More Link ── */
.show-more-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.show-more-link:hover {
    gap: 8px;
    color: var(--primary);
}

/* ── Chart Card ── */
.chart-card {
    background: #fff;
    border: 1.5px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-card .chart-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    align-self: flex-start;
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Input Group Custom (icon + input pill) ── */
.input-group-custom {
    display: flex;
    align-items: center;
    background: var(--bg-cream);
    border: 1.5px solid var(--card-border);
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    transition: border-color var(--transition-fast);
    position: relative;
}

.input-group-custom:focus-within {
    border-color: var(--primary);
    background: #fff;
}

.input-group-custom .input-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 16px;
    flex-shrink: 0;
}

.form-control-custom {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 12px 16px 12px 4px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
}

.form-control-custom::placeholder {
    color: var(--text-muted);
}

/* ── Sidebar Overlay (mobile) ── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ── Icon circle for header ── */
.icon-circle-outline {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-circle-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}