/* --- Modern Variable & Reset --- */
:root {
    --primary-dark: #1B5E20;   /* ডার্ক গ্রিন */
    --primary-light: #4CAF50;  /* লাইট গ্রিন */
    --accent-bg: #E8F5E9;      /* হালকা ব্যাকগ্রাউন্ড */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0,0,0,0.08);
    --radius: 12px;
}

.dspu-frontend {
    font-family: 'Tiro Bangla', 'Poppins', sans-serif;
    max-width: 1000px;
    margin: 40px auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid #eee;
}

/* --- Modern Tabs --- */
.dspu-tab {
    display: flex;
    background: #f8f9fa;
    padding: 10px;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.dspu-tab button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Tiro Bangla', sans-serif;
}

.dspu-tab button:hover {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-dark);
}

.dspu-tab button.active {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(27, 94, 32, 0.3);
}

.dspu-tabcontent {
    display: none;
    padding: 30px;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dspu-frontend h2 {
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-weight: 700;
    border-left: 5px solid var(--primary-light);
    padding-left: 15px;
}

/* --- Forms & Inputs --- */
form#dspu-search-form, form#dspu-upload-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-field-group {
    display: flex;
    flex-direction: column;
}

.form-field-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

input[type="text"], input[type="file"], input[type="date"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border 0.3s;
    background: #fdfdfd;
    font-family: 'Tiro Bangla', sans-serif;
}

input[type="text"]:focus, input[type="date"]:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    height: 48px; /* Match input height roughly */
    align-self: end; /* Align with inputs */
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Tiro Bangla', sans-serif;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* --- Filter Bar (Toolbar Style) --- */
.dspu-filter-bar {
    background: var(--accent-bg);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    border: 1px solid #c8e6c9;
    margin-bottom: 25px;
}

.dspu-filter-bar input {
    flex: 1;
    min-width: 150px;
}

.dspu-filter-bar button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-family: 'Tiro Bangla', sans-serif;
    transition: background 0.3s;
}

#dspu-filter-btn { background: var(--primary-dark); }
#dspu-filter-btn:hover { background: #144a18; }
#dspu-reset-btn { background: #7f8c8d; }
#dspu-reset-btn:hover { background: #616a6b; }

/* --- Photo Grid & Cards (Modern Look) --- */
.dspu-results-area, .dspu-my-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Common Item Style for Search & My Gallery */
.result-item, .my-photo-item {
    background: var(--white);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-item:hover, .my-photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

/* Passport Size Image Logic */
.result-item img, .my-photo-item img {
    width: 160px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto 10px auto;
    display: block;
    background: #f0f0f0; /* Loader placeholder color */
}

.mobile-no {
    font-weight: bold;
    color: var(--primary-dark);
    margin: 5px 0 10px 0;
    font-size: 15px;
}

/* Action Buttons */
.photo-actions, .my-photo-item a {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.download-photo-btn, .download-mini-btn {
    background-color: var(--primary-light);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
    width: 100%;
    display: block;
}

.download-photo-btn:hover, .download-mini-btn:hover {
    background-color: var(--primary-dark);
}

.delete-photo-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* --- Customer Card (Modern ID Style) --- */
.customer-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
    border: 2px solid var(--primary-dark);
    border-radius: 15px;
    padding: 30px;
    position: relative;
    font-family: 'Anek Bangla', sans-serif;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.customer-card-logo {
    width: 80px;
    position: absolute;
    top: 20px;
    left: 20px;
}

.customer-card h4 {
    color: var(--primary-dark);
    font-size: 22px;
    margin-top: 50px;
    border-bottom: 2px dashed var(--primary-light);
    padding-bottom: 10px;
    display: inline-block;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.whatsapp-share-btn {
    background-color: #25D366;
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
}

.download-card-btn {
    background-color: var(--text-dark);
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
}

/* --- Stats & Loader --- */
.dspu-user-stats h4 {
    background: var(--accent-bg);
    color: var(--primary-dark);
    border: 1px solid #c8e6c9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Mobile Responsive */
@media (max-width: 600px) {
    .dspu-tab { flex-direction: column; gap: 5px; }
    .dspu-filter-bar { flex-direction: column; align-items: stretch; }
    .form-field-group, button[type="submit"] { width: 100%; }
}