.tabs {
    display: flex;
    justify-content: space-around;
    padding: 1px 0;
    background: #f8f9fa;
}

.tab {
    padding: 1px 0;
    border: none;
    background: none;
    cursor: pointer;
    width: 50%;
    font-size: 16px;
    color: #6c757d;
}

.tab.active {
    color: green;
    border-bottom: 0.5px solid green;
}

.tab-content {
    display: none;
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

#phoneNumber {
    width: 100%;
    padding: 5px 35px 5px 10px;
    font-size: 24px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
}

.dial-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
    flex: 1;
}

.dial-pad button {
    padding: 2px;
    font-size: 19px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    
    aspect-ratio: 1.7;
    position: relative;
    transition: transform 0.1s ease;
}

.dial-pad button:active {
    transform: scale(1.2);
    
}



.dial-pad button:hover {
    background: #d0f0c0;
    border: 1px solid green;
}

.subtext {
    font-size: 10px;
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    color: #6c757d;
}

.actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.actions .action-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.actions button {
    padding: 7px;
    font-size: 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.call-btn, .whatsapp-btn {
    border: 2px solid #ccc;
    border-radius: 50%;
    width: 150px;
    height: 40px;
    font-size: 20px;
}

.call-btn {
    background: gray;
    color: white;
}

.whatsapp-btn {
    background: gray;
    color: white;
}

.save-btn {
    background: #28a745;
    color: white;
    border-radius: 5px;
    padding: 8px 15px;
}

.input-container {
    position: relative;
    width: 95%;
    
}

.paste-btn, .clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.paste-btn {
    color: #6c757d;
}

.clear-btn {
    color: #dc3545;
    
}

.backspace-btn {
    position: absolute;
    right: 0px;
    top: 39%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: red;
    cursor: pointer;
    font-size: 16px;
}

.action-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    margin-top:-10px;
}

.contact-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-actions button {
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-contact-btn {
    background: none;
    border: 2px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-btn, .import-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
}

#contactList {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    text-transform: capitalize;
    max-height: calc(100vh - 160px);
}

#contactList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

#contactList li > span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.form-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 350px;
}

.form-content h2 {
    margin-top: 0;
}

.form-content input {
    width: 100%;
    padding: 10px 35px 10px 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.form-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.add-field-btn {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.add-field-btn button {
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

.add-field-btn button:hover {
    background: #e9ecef;
}

.contact-field {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
    position: relative;
}

.contact-field input {
    flex: 1;
    padding: 5px 35px 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.contact-field .paste-field-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px;
}

.contact-field button {
    margin-left: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 8px;
    cursor: pointer;
}



/* Tambahkan di bagian CSS */
#categoryFilter select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
    font-size: 14px;
    margin-right: 10px;
}

.contact-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

/* Category Manager Styles */
.category-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.category-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.category-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.category-item button {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
}

.manage-categories-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px;
    margin-left: 5px;
}

/* Form input container for category dropdown */
.input-container select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
}

.category-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 5px;
}

.category-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.move-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #6c757d;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
}

/* Tambahkan di styles.css */
.category-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.category-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.move-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    color: #6c757d;
}

.move-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.category-name {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 120px;
}



.category-name {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.category-item input[type="text"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 0;
}