body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f1f5f9;
}
.dashboard {
    display: flex;
}
.sidebar {
    width: 220px;
    background: #1e293b;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
}
.sidebar a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar a:hover,
.sidebar a.active {
    background: #334155;
}
.sidebar-bottom {
    border-top: 1px solid #334155;
}
.main-content {
    margin-left: 220px;
    width: calc(100% - 220px);
}
.navbar {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.page-title {
    font-weight: 600;
    color: #1e293b;
}
.theme-icon {
    cursor: pointer;
    color: #334155;
}
.content-area {
    padding: 20px;
}
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}
th {
    background: #f9fafb;
    font-weight: 600;
}
.action-icons button {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 5px;
    color: #334155;
}
.action-icons button:hover {
    color: #3b82f6;
}

/* === Modal === */
/*.modal {*/
/*    display: none;*/
/*    position: fixed;*/
/*    z-index: 1000;*/
/*    left: 0; top: 0;*/
/*    width: 100%; height: 100%;*/
/*    background: rgba(0,0,0,0.5);*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*}*/
/*.modal-overlay {*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    background: rgba(0,0,0,0.5);*/
/*}*/

/*.modal-content {*/
/*    background: white;*/
/*    padding: 20px;*/
/*    border-radius: 8px;*/
/*    width: 400px;*/
/*    max-width: 90%;*/
/*    text-align: center;*/
/*    position: relative;*/
/*}*/

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    padding: 20px;
    z-index: 1000;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}
.close-btn:hover {
    color: #ef4444;
}
.modal h4 {
    margin-top: 0;
}
.modal button.confirm {
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    margin-top: 10px;
    cursor: pointer;
}
.modal button.cancel {
    background: #cbd5e1;
    color: #1e293b;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    margin-top: 10px;
    margin-left: 5px;
    cursor: pointer;
}
.modal input[type="text"],
.modal input[type="number"] {
    width: 90%;
    padding: 8px;
    margin-bottom: 10px;
}












/* Redirect card styling */
#createLinkForm {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    margin: 0 auto; /* Center horizontally */
    display: flex;
    flex-direction: column;
}

/* Center form container vertically and horizontally */
.form-area {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px); /* Adjust for navbar height */
}

.redirect-card {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.redirect-card input[type="text"],
.redirect-card input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%;
}

.redirect-card input[type="text"]:focus,
.redirect-card input[type="number"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.redirect-card button.remove-redirect-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.redirect-card button.remove-redirect-btn:hover {
    background: #dc2626;
}

.error-icon {
    font-size: 16px;
    margin-left: 5px;
}

#addRedirectBtn,
#createLinkForm button[type="submit"],
#createLinkForm button[type="button"] {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#addRedirectBtn {
    background: #3b82f6;
    color: white;
}

#addRedirectBtn:hover {
    background: #2563eb;
}

button[type="button"]:not(#addRedirectBtn) {
    background: #e5e7eb;
    color: #374151;
}

button[type="button"]:not(#addRedirectBtn):hover {
    background: #d1d5db;
}

button[type="submit"] {
    background: #3b82f6;
    color: white;
}

button[type="submit"]:hover {
    background: #2563eb;
}


/* ===== Edit Link Form (Modal) Styling ===== */

#editLinkForm {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

#editLinkForm input[type="text"],
#editLinkForm input[type="number"] {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#editLinkForm input[type="text"]:focus,
#editLinkForm input[type="number"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

#editLinkForm .redirect-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

#editLinkForm .redirect-group input[type="text"] {
    flex: 3;
}

#editLinkForm .redirect-group input[type="number"] {
    flex: 1;
    min-width: 60px;
}

#editLinkForm .remove-redirect {
    font-size: 16px;
    color: #ef4444;
    cursor: pointer;
    transition: color 0.3s;
}

#editLinkForm .remove-redirect:hover {
    color: #dc2626;
}

#editLinkForm button[type="button"],
#editLinkForm button[type="submit"] {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#editLinkForm button[type="button"] {
    background: #e5e7eb;
    color: #374151;
}

#editLinkForm button[type="button"]:hover {
    background: #d1d5db;
}

#editLinkForm button[type="submit"] {
    background: #3b82f6;
    color: white;
}

#editLinkForm button[type="submit"]:hover {
    background: #2563eb;
}



/* settings */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-weight: 600;
}

.form-group input[type="text"] {
    width: 80%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    border-color: #3b82f6;
    outline: none;
}




/* login */
.login-card {
    background: white;
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.login-card input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
}

.login-card button {
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.login-card button:hover {
    background: #2563eb;
}




/* Admin forms container */
.admin-forms-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-card {
    flex: 1 1 300px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-card h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.admin-card form {
    display: flex;
    flex-direction: column;
}

.admin-card form label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.admin-card form input[type="text"],
.admin-card form input[type="email"],
.admin-card form input[type="password"] {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
    outline: none;
    transition: border 0.2s;
}

.admin-card form input[type="text"]:focus,
.admin-card form input[type="email"]:focus,
.admin-card form input[type="password"]:focus {
    border-color: #3b82f6;
}

.admin-card form button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 0;
    margin-top: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-card form button:hover {
    background: #2563eb;
}




/*pagination buttons*/

.pagination-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border: none;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}
.pagination-btn:hover {
    background: #2563eb;
}


.refr-link {
    text-decoration: none;
}
