/* Campaigns Page Styles */

.campaigns-page {
    padding: 0;
}

/* Header */
.campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.campaigns-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.campaigns-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.campaigns-actions .btn {
    white-space: nowrap;
}

.btn-warning {
    background: #F59E0B;
    color: #fff;
}

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

.btn-success {
    background: #10B981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

/* Toolbar */
.campaigns-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.campaigns-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 8px 20px;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #F9FAFB;
}

.tab-btn.active {
    background: #F3F4F6;
    color: #111827;
    border-color: #D1D5DB;
}

.campaigns-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-range-picker {
    position: relative;
}

.date-range-picker input {
    width: 200px;
    padding-right: 36px;
}

.date-range-picker i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.search-container .search-input {
    padding-left: 36px;
    width: 250px;
}

/* Data Table */
.campaigns-grid {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #F9FAFB;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #E5E7EB;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    color: #4F46E5;
}

.data-table th i {
    margin-left: 4px;
    font-size: 10px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
    color: #374151;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: #F9FAFB;
}

/* Column Widths */
.th-status { width: 80px; }
.th-partner { width: 150px; }
.th-campaign { min-width: 200px; }
.th-bid { width: 180px; }
.th-spend { width: 120px; }
.th-actions { width: 60px; }

/* Right-align numeric columns */
.th-bid,
.td-bid,
.th-spend,
.td-spend {
    text-align: right;
}

/* Status Dot */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-active {
    background: #10B981;
}

.status-paused {
    background: #F59E0B;
}

.status-inactive {
    background: #9CA3AF;
}

.status-review {
    background: #3B82F6;
}

/* Action Menu Button */
.btn-action-menu {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
}

.btn-action-menu:hover {
    background: #F3F4F6;
    color: #111827;
}

/* Action Menu Dropdown */
.action-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    min-width: 150px;
    padding: 4px 0;
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    text-align: left;
}

.action-menu-item:hover {
    background: #F3F4F6;
}

.action-menu-item i {
    width: 16px;
    color: #6B7280;
}

.action-menu-danger {
    color: #EF4444;
}

.action-menu-danger i {
    color: #EF4444;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
}

/* Pagination */
.campaigns-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 14px;
    color: #6B7280;
}

.pagination-info {
    color: #6B7280;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-select {
    padding: 6px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #fff;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
}

.pagination-btn:hover:not(:disabled) {
    background: #F3F4F6;
    color: #111827;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-number {
    width: 32px;
    height: 32px;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.page-number:hover {
    background: #F3F4F6;
}

.page-number.active {
    background: #4F46E5;
    color: #fff;
    border-color: #4F46E5;
}

/* Budget Modal */
.budget-partner-name {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 16px;
}

.input-with-prefix {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
    font-size: 14px;
}

.input-with-prefix input {
    padding-left: 28px;
}

.budget-summary {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.budget-item span:first-child {
    color: #6B7280;
}

.budget-item span:last-child {
    font-weight: 600;
    color: #111827;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-sm {
    width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #F3F4F6;
    color: #111827;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #E5E7EB;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: #4F46E5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338CA;
}

.btn-primary:disabled {
    background: #A5B4FC;
    cursor: not-allowed;
}

.btn-outline {
    background: #fff;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.btn-outline:hover:not(:disabled) {
    background: #F9FAFB;
}

.btn-outline:disabled {
    color: #9CA3AF;
    cursor: not-allowed;
}

.btn-danger {
    background: #EF4444;
    color: #fff;
}

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

.text-danger {
    color: #EF4444;
}
