/* Importing Google Fonts and FontAwesome */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
*{
    margin: 0;
    padding: 0;    
}
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f9fc;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #6a89cc, #38ada9);
    color: #fff;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    position: relative;
}

header h1 {
    font-size: 2rem;
    margin: 0;
    letter-spacing: 1px;
}

.burger-menu {
    display: none;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    padding: 0;
    list-style: none;
    text-align: center;
    margin-top: 10px;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dashboard {
    display: flex;
    justify-content: space-around;
    margin: 40px 0;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 40%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #6a89cc;
}

.card p {
    font-size: 2.5rem;
    font-weight: bold;
    color: #38ada9;
    margin: 0;
}

.add-farmer, .farmer-list {
    background: #fff;
    padding: 40px;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease;
}

.add-farmer h2, .farmer-list h2 {
    font-size: 2rem;
    color: #38ada9;
    margin-bottom: 20px;
}

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

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #6a89cc;
}

form input[type="text"], form input[type="tel"],form input[type="email"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 1rem;
    color: #555;
}

form input[type="submit"] {
    background: #38ada9;
    color: #fff;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

form input[type="submit"]:hover {
    background: #32a084;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    animation: fadeInUp 1s ease;
}

table th, table td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 1rem;
    color: #333;
}

table th {
    background-color: #38ada9;
    color: #fff;
    text-transform: uppercase;
}

.sms-btn {
    background: #38ada9;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.sms-btn:hover {
    background: #32a084;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    bottom: 0;
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.loader {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #38ada9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
        width: 100%;
    }
    header {
        background: linear-gradient(135deg, #6a89cc, #38ada9);
        color: #fff;
       /* padding: 20px 0;*/
        text-align: center;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        position: relative;
        width: 130%;
        left:-21px;
    }
    .dashboard {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        left: 10px;
    }
    .farmer-list {
        width: 100%;
    }
    table{
        left:-5px;
        width:90%;
    margin-top: 20px;

    }
    .card {
        margin-bottom: 20px;
        margin-left: 20px;
        width:100%;
    }

    .burger-menu {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: #38ada9;
        position: absolute;
        top: 60px;
        right: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links.active {
        display: flex;
    }

    nav ul li a {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .add-farmer{
        background: #fff;
        padding: 40px;
        margin: 20px 0;
        border-radius: 15px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        animation: fadeInUp 1s ease;
        left: 15px;
        width: 100%;
    }

    form{
        width:90%;
    }
}

/* Keyframes for animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
