/* public/css/style.css - Same as before, no changes needed */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: #2d3748;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-user span {
    color: #cbd5e0;
}

.btn-logout {
    background: #e53e3e;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #c53030;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.btn-primary {
    width: 100%;
    background: #4299e1;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #3182ce;
}

.alert-error {
    background: #fed7d7;
    color: #9b2c2c;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #feb2b2;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.badge {
    background: #4299e1;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.listing-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.listing-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #2d3748;
}

.listing-card .address {
    color: #718096;
    font-size: 14px;
    margin-bottom: 6px;
}

.listing-card .price {
    font-weight: 600;
    color: #2b6cb0;
    font-size: 18px;
}

.listing-card .meta {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    color: #a0aec0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #4299e1;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #ebf8ff;
    border-color: #4299e1;
}

.pagination .active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.pagination .disabled {
    color: #a0aec0;
    pointer-events: none;
}

.no-listings {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-listings p {
    font-size: 18px;
}

.detail-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.detail-header .address {
    color: #718096;
    margin-bottom: 4px;
}

.detail-header .price {
    font-weight: 600;
    color: #2b6cb0;
    font-size: 18px;
}

.detail-header .cian-id {
    font-size: 13px;
    color: #a0aec0;
}

.video-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.video-section h3 {
    margin-bottom: 15px;
    font-weight: 500;
}

.video-section .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
}

.video-section .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.clip-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.clip-card.bad {
    border-color: #e53e3e;
    background: #fff5f5;
}

.clip-card .clip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.clip-card .clip-number {
    font-weight: 600;
    font-size: 15px;
}

.clip-card .clip-status {
    font-size: 12px;
    color: #718096;
}

.clip-card .video-wrapper {
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.clip-card video {
    width: 100%;
    display: block;
}

.clip-card .clip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.clip-card .missing-clip {
    background: #fefcbf;
    color: #975a16;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e0;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: #e53e3e;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 13px;
    color: #4a5568;
}

.clip-motion {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #38a169;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c53030;
}

.btn-back {
    background: #718096;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 4px;
    display: inline-block;
}

.btn-back:hover {
    background: #4a5568;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast-success {
    background: #48bb78;
}

.toast-error {
    background: #e53e3e;
}

.toast-info {
    background: #4299e1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .listing-grid {
        grid-template-columns: 1fr;
    }
    
    .clips-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .clip-card .clip-actions {
        flex-wrap: wrap;
    }
}