/* Custom styles for Scope Assignments */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #ff6b35;
    text-decoration: none;
}

/* Auth Form Styles */
.auth-form {
    margin-top: 20px;
}

.auth-form h2 {
    color: var(--primary-dark-blue);
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: #fff;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

.auth-form p {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.auth-form p a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-form p a:hover {
    text-decoration: underline;
}

/* Message Styles */
.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    min-height: 100vh;
    background-color: #f5f6fa;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-dark-blue) 0%, var(--primary-blue) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.closed {
    transform: translateX(-100%);
}

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

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}
.sidebar-header p{
    font-size:0.8rem ;
}

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

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-orange);
}
#page-title{
    font-size: 15px;
    font-weight: 500;
}
.sidebar-menu li a i {
    margin-right: 12px;
    width: 20px;
    font-size: 1.1rem;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.main-content.full-width {
    margin-left: 0;
}

.dashboard-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    position: fixed;
    right: 0;
    left: 260px;
    right:0;
    top: 0;
    z-index: 100;
    transition: left 0.3s ease;
}
.main-content.full-width .dashboard-header{
    left:0;
}
.tasks-table h2{
    font-size: 15px;
    padding-bottom: 6px;
}
@media(max-width:768px)
{
    .tasks-table h2{
        padding: 10px 0;
        font-size: 12px;
        font-weight: 500;
    }
    .modal .modal-content{
       
        padding: 30px;
    }
    .dashboard-header{
        left: 0px;

    }
    .form-group label{
        font-size: 11px;
    }
    .stats-grid{
        flex-direction: column;
        padding: 0em 0em;
    }
    .main-content{
        padding: 10px 20px;
    
    }
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.sidebar-toggle i{
color: var(--text-dark);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.dashboard-content {
    padding: 30px;
}

/* Stats Cards */
.stats-grid {

    display: flex;
    width:100%;
    justify-content: start;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
     width:100%;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.stat-card h3 {
    margin: 0 0 10px 0;
    color: var(--text-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark-blue);
    margin: 0;
}
a{
    text-decoration: none;
}
.stat-card.pending .stat-number { color: #ff9800; }
.stat-card.in-progress .stat-number { color: var(--primary-blue); }
.stat-card.completed .stat-number { color: #4caf50; }

/* Task Forms */
.task-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.task-form h2 {
    color: var(--primary-dark-blue);
    margin-bottom: 25px;
    font-size: 16px;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.file-upload {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: border-color 0.3s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary-blue);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-text {
    color: #666;
    font-size: 0.9rem;
}

.file-upload i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

/* Tasks Table */
.tasks-table {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.tasks-table th,
.tasks-table td {
    padding: 15px;
    font-size: 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.tasks-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-dark);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-quoted { background: #d1ecf1; color: #0c5460; }
.status-paid { background: #d4edda; color: #155724; }
.status-in_progress { background: #cce5ff; color: #004085; }
.status-completed { background: #d1f2eb; color: #0f5132; }

/* Responsive Design */
@media (max-width: 768px) {
    /* Navbar fixes */
    .navbar .container {
        padding: 0 15px;
    }
    .modal{
        padding: 10px;
    }
    .nav-brand span {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-actions {
        display: flex;
        gap: 10px;
    }
    
    .nav-actions a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .hamburger {
        display: block;
    }
    
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-header {
        padding: 12px 15px;
    }
    
    .dashboard-header h1 {
        font-size: 1.4rem;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
   
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Tables responsive */
    .tasks-table {
        color:#333;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tasks-table table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .tasks-table th,
    .tasks-table td {
        color:#333;
        padding: 8px;
        white-space: nowrap;
    }
    
    /* Hide less important columns on mobile */
    .tasks-table .hide-mobile {
        display: none;
    }
    
    /* Form improvements */
    .task-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 1rem;
    }
    
    /* User info responsive */
    .user-info {
         gap: 10px;
    }
    
    .user-info span {
        display: none;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        padding: 15px;
        width: 98%;
    }
    
    .auth-form h2 {
        font-size: 1.3rem;
    }
    
    .dashboard-content {
        padding: 10px;
    }
    
    .task-form {
        padding: 15px;
    }
    
   
    
    .stat-card {
        padding: 12px;
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .nav-brand span {
        font-size: 1.1rem;
    }
    
    .nav-actions a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-menu li a {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Payment Modal */
.payment-modal .modal-content {
    max-width: 400px;
}

.payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.payment-info h4 {
    margin: 0 0 15px 0;
    color: var(--primary-dark-blue);
}

.payment-info p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.payment-info strong {
    color: var(--primary-dark-blue);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.dashboard-footer {
    background: white;
    padding: 20px 30px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
}

/* Homepage responsive fixes */
@media (max-width: 768px) {
    .main .headline {
        font-size: 1.8rem !important;
        padding: 0 20px;
        line-height: 1.2;
    }
    
    .osteps {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    
    .ostep {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .cost-section {
        padding: 0 20px;
    }
    
    .cost-section h2 {
        font-size: 1.5rem;
    }
    
    .cost-section p {
        font-size: 0.95rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .test-order-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-section {
        padding: 40px 20px;
    }
    
  
    
    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main .headline {
        font-size: 1.5rem !important;
    }
    
   
    .cost-section h2 {
        font-size: 1.3rem;
    }
    
    .payment-icons {
        justify-content: center;
        gap: 10px;
    }
    
    .payment-icons img {
        width: 35px;
        height: 35px;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 6px 12px;
    font-size:10px;
}

/* Mobile navigation styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    margin: 2px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 4px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -4px);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    .nav-menu a {
        font-size: 1.1rem;
        padding: 10px 20px;
        display: block;
    }
}
