/* Dreampaws Admin Dashboard Styles */

/* Base Styles */
:root {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --sidebar-width: 260px;
    --topnav-height: 70px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f6fa;
    color: #333;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-logo {
    width: 60px;
    height: auto;
    margin-bottom: 15px;
}

.login-header h2 {
    font-weight: 600;
    margin-bottom: 10px;
}

.login-form {
    padding: 30px;
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    text-align: center;
}

/* Admin Body Layout */
.admin-body {
    margin: 0;
    padding: 0;
    background-color: #f5f6fa;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 40px;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #dc3545;
    color: white;
}

.logout-btn i {
    margin-right: 10px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Top Navigation */
.top-nav {
    height: var(--topnav-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 30px;
    justify-content: space-between;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-toggle:hover {
    background-color: #f1f2f6;
}

.nav-title h4 {
    margin: 0;
    color: var(--dark-color);
    font-weight: 600;
}

.nav-title p {
    margin: 0;
    font-size: 0.9rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-name {
    font-weight: 500;
    color: var(--dark-color);
}

/* Dashboard Main */
.dashboard-main {
    padding: 30px;
    min-height: calc(100vh - var(--topnav-height));
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-content p {
    margin: 5px 0 0;
    color: #666;
    font-weight: 500;
}

.stat-content small {
    font-size: 0.8rem;
}

/* Quick Actions */
.quick-actions-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
}

/* Activity Card */
.activity-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.card-title {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

.activity-list {
    padding: 25px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f2f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.activity-content p {
    margin: 0;
    font-weight: 500;
    color: var(--dark-color);
}

/* Featured Dogs */
.featured-dogs-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.featured-dog {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f2f6;
}

.featured-dog:last-child {
    border-bottom: none;
}

.dog-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.dog-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

.dog-info p {
    margin: 5px 0;
    font-weight: 500;
}

/* Tables */
.dogs-table-card,
.subscribers-table-card,
.litters-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table {
    margin: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

.dog-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 5px 8px;
}

/* Search and Filters */
.search-filters {
    margin-bottom: 20px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

/* Bulk Actions */
.bulk-actions {
    padding: 15px 25px;
    background-color: #e3f2fd;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Litter Cards */
.litters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 25px;
}

.litter-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.litter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.litter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.litter-breed h6 {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--dark-color);
}

.litter-actions {
    display: flex;
    gap: 5px;
}

.parent-info {
    margin-bottom: 15px;
}

.parent {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.litter-details {
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #666;
}

.detail-item i {
    width: 16px;
    color: var(--primary-color);
}

.litter-images {
    display: flex;
    align-items: center;
    gap: 8px;
}

.puppy-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.more-images {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background-color: #f1f2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
}

.ultrasound-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background-color: #e8f5e8;
    color: var(--success-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Email Templates */
.email-templates-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

.template-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.3s ease;
}

.template-card:hover {
    border-color: var(--primary-color);
}

.template-preview h6 {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--dark-color);
}

.template-actions {
    margin-top: 15px;
}

/* Breed Analytics */
.breed-interests-card,
.subscriber-growth-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.breed-chart {
    margin-top: 20px;
}

.breed-bar {
    margin-bottom: 20px;
}

.breed-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.breed-progress {
    position: relative;
    background-color: #f1f2f6;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark-color);
}

.growth-stats {
    margin-top: 20px;
}

.growth-item {
    padding: 15px 0;
    border-bottom: 1px solid #f1f2f6;
    text-align: center;
}

.growth-item:last-child {
    border-bottom: none;
}

.growth-period {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.growth-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.growth-change {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
}

.upload-placeholder {
    cursor: pointer;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.preview-image {
    position: relative;
}

.preview-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Styles */
.traits-checkboxes,
.breed-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

/* Newsletter Templates */
.newsletter-templates {
    margin-bottom: 20px;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .top-nav {
        padding: 0 15px;
    }
    
    .dashboard-main {
        padding: 20px 15px;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-title {
        display: none;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .litters-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .featured-dog {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* Dark Theme */
.dark-theme {
    --light-color: #2c3e50;
    --dark-color: #ecf0f1;
}

.dark-theme .admin-body {
    background-color: #1a1a1a;
}

.dark-theme .top-nav {
    background-color: #2c3e50;
    color: white;
}

.dark-theme .stat-card,
.dark-theme .quick-actions-card,
.dark-theme .activity-card,
.dark-theme .featured-dogs-card,
.dark-theme .dogs-table-card,
.dark-theme .litters-card,
.dark-theme .email-templates-card,
.dark-theme .breed-interests-card,
.dark-theme .subscriber-growth-card {
    background-color: #34495e;
    color: white;
}

.dark-theme .table th {
    background-color: #2c3e50;
    color: white;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}