/**
 * The Clean Scene - Admin Styles
 * Styles for admin dashboard and PIN entry
 */

/* ======= Modal Styles ======= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

/* Footer Copyright Styles */
#footer-copyright {
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    user-select: none;
}

#footer-copyright:hover {
    color: var(--primary-color);
    transform: scale(1.02);
}

#footer-copyright:active {
    transform: scale(0.98);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px);
    animation: slideUp 0.4s forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.modal-header {
    padding: 20px;
    background-color: rgba(0, 118, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
}

/* PIN Entry Styles */
.pin-container {
    position: relative;
    margin: 30px 0;
}

.pin-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#pin-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.pin-dot.filled {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.pin-message {
    text-align: center;
    margin: 15px 0;
    font-size: 0.9rem;
    height: 20px;
    color: var(--text-color);
}

.pin-message.error {
    color: var(--error-color, #ff3b30);
}

.pin-message.success {
    color: var(--success-color, #34c759);
}

/* Shake Animation */
.shake-animation {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* ======= Admin Dashboard Styles ======= */
.admin-page {
    background-color: #0d1117;
    color: #e6edf3;
}

.admin-page .page-wrapper {
    padding-top: 70px;
}

.admin-header {
    background-color: #161b22;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.admin-badge {
    display: flex;
    align-items: center;
    background-color: rgba(0, 118, 255, 0.2);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 118, 255, 0.3);
}

.admin-badge i {
    margin-right: 6px;
}

.admin-actions {
    margin-left: auto;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 150px);
}

/* Admin Sidebar */
.admin-sidebar {
    width: 240px;
    background-color: #161b22;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fff;
    font-size: 1.3rem;
}

.user-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.user-info p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: #e6edf3;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

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

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background-color: rgba(0, 118, 255, 0.15);
    color: var(--primary-color);
}

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
}

.stat-card {
    background-color: #21262d;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background-color: rgba(0, 118, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.stat-info {
    flex-grow: 1;
}

.stat-info span {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3px;
}

.stat-info h4 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Admin Content */
.admin-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: #0d1117;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

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

.search-container {
    position: relative;
}

.search-container input {
    padding: 10px 15px 10px 40px;
    background-color: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e6edf3;
    width: 250px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(22, 27, 34, 0.8);
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

.filter-btn, .sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #21262d;
    border: none;
    border-radius: 8px;
    color: #e6edf3;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-btn:hover, .sort-btn:hover {
    background-color: #30363d;
}

/* Submissions Grid */
.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Loader */
.loader-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 118, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-container p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Submission Cards */
.submission-card {
    background-color: #161b22;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.submission-type {
    background-color: #21262d;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.submission-type i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.submission-date {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.submission-name {
    padding: 15px 15px 5px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.submission-details {
    padding: 5px 15px 15px;
    flex-grow: 1;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.detail-label {
    width: 60px;
    color: rgba(255, 255, 255, 0.6);
}

.detail-value {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submission-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.submission-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.view-details-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.view-details-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.view-details-btn i {
    font-size: 0.7rem;
}

.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #238636;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Updated styles for the new badge in standard cards */
.submission-type .new-badge {
    position: static;
    margin-left: 8px;
    margin-right: auto;
    font-size: 0.7rem;
    padding: 2px 8px;
}

/* Type-specific colors */
.residential i {
    color: #58a6ff;
}

.airbnb i {
    color: #f05252;
}

.commercial i {
    color: #bb9af7;
}

.move-in-move-out i {
    color: #f0883e;
}

/* Detail Modal */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.detail-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #161b22;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.detail-modal-header {
    padding: 20px;
    background-color: #21262d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-modal-header h3 {
    margin: 0;
    font-weight: 600;
}

.close-detail-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-detail-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.detail-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.detail-header {
    margin-bottom: 25px;
}

.detail-header h2 {
    margin: 10px 0;
    font-size: 1.6rem;
}

.detail-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 5px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    margin: 0 0 15px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    margin-bottom: 10px;
}

.detail-item .detail-label {
    display: block;
    width: auto;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.detail-item .detail-value {
    font-size: 0.95rem;
}

.detail-item .detail-value a {
    color: var(--primary-color);
    text-decoration: none;
}

.detail-item .detail-value a:hover {
    text-decoration: underline;
}

.cost-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.message-box {
    background-color: #21262d;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.detail-modal-footer {
    padding: 15px 20px;
    background-color: #21262d;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 20px;
    }
    
    .admin-stats {
        grid-template-columns: 1fr 1fr;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .content-actions {
        width: 100%;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Open Body Style */
body.modal-open {
    overflow: hidden;
} 