/* Custom CSS for Zoho CRM Clone */

/* Zoho-inspired Loader */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-container {
    text-align: center;
}

/* Main Zoho-inspired loader */
.zoho-loader {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.zoho-loader div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4285f4;
    animation: zoho-loader 1.2s linear infinite;
}

.zoho-loader div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.zoho-loader div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
    background: #ea4335;
}

.zoho-loader div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
    background: #fbbc05;
}

.zoho-loader div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
    background: #34a853;
}

.zoho-loader div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
    background: #4285f4;
}

.zoho-loader div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
    background: #ea4335;
}

.zoho-loader div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
    background: #fbbc05;
}

.zoho-loader div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
    background: #34a853;
}

.zoho-loader div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
    background: #4285f4;
}

@keyframes zoho-loader {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.7);
    }
}

.loader-text {
    margin-top: 15px;
    color: #333;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Sidebar styling */
#sidebar-wrapper {
    min-height: 100vh;
    width: 250px;
    transition: margin 0.25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
}

#sidebar-wrapper .list-group-item {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    padding: 15px;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: #343a40 !important;
}

#page-content-wrapper {
    min-width: 0;
    width: 100%;
}

.wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

/* Card styling */
.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-radius: 8px;
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0 !important;
}

.card-body {
    padding: 20px;
}

/* Dashboard stats */
.stat-card {
    border-left: 4px solid;
    border-radius: 4px;
    transition: transform 0.3s;
}

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

.stat-card.primary {
    border-left-color: #007bff;
}

.stat-card.success {
    border-left-color: #28a745;
}

.stat-card.warning {
    border-left-color: #ffc107;
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card .card-body {
    padding: 15px;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* Table styling */
.table-container {
    overflow-x: auto;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Form styling */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Login page */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.login-card {
    width: 400px;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -250px;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

/* Transaction page styling */
.transaction-details {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.transaction-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.status-pending {
    background-color: #ffeeba;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-overdue {
    background-color: #f8d7da;
    color: #721c24;
}

/* Deal pipeline visualization */
.pipeline-container {
    display: flex;
    overflow-x: auto;
    padding: 20px 0;
}

.pipeline-stage {
    min-width: 250px;
    margin-right: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.pipeline-stage-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.pipeline-card {
    background-color: white;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.pipeline-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
